{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Neural Machine Translation with Attention: German to English\n",
    "\n",
    "Here we implement a neural machine translator with attention using standard TensorFlow operations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.5/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
      "  from ._conv import register_converters as _register_converters\n"
     ]
    }
   ],
   "source": [
    "# These are all the modules we'll be using later. Make sure you can import them\n",
    "# before proceeding further.\n",
    "%matplotlib inline\n",
    "from __future__ import print_function\n",
    "import collections\n",
    "import math\n",
    "import numpy as np\n",
    "import os\n",
    "import random\n",
    "import tensorflow as tf\n",
    "import zipfile\n",
    "from matplotlib import pylab\n",
    "from six.moves import range\n",
    "from six.moves.urllib.request import urlretrieve\n",
    "import tensorflow as tf\n",
    "from PIL import Image\n",
    "from collections import Counter\n",
    "import csv\n",
    "import matplotlib.gridspec as gridspec\n",
    "import word2vec\n",
    "\n",
    "from nltk.translate.bleu_score import corpus_bleu\n",
    "import nltk"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Loading Data \n",
    "\n",
    "First, download the data from this [page](https://nlp.stanford.edu/projects/nmt/). The required files are:\n",
    "\n",
    "* File containing German sentences: [`train.de`](https://nlp.stanford.edu/projects/nmt/data/wmt14.en-de/train.de)\n",
    "* File containing English sentences: [`train.en`](https://nlp.stanford.edu/projects/nmt/data/wmt14.en-de/train.en)\n",
    "* File containing German vocabulary: [`vocab.50K.de`](https://nlp.stanford.edu/projects/nmt/data/wmt14.en-de/vocab.50K.de)\n",
    "* File containing English vocabulary: [`vocab.50K.en`](https://nlp.stanford.edu/projects/nmt/data/wmt14.en-de/vocab.50K.en)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading Vocabulary\n",
    "\n",
    "First we build the vocabulary dictionaries for both the source (German) and target (English) languages. The vocabularies are found in the `vocab.50K.de` (German) and `vocab.50K.en` files."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Source\n",
      "\t [('Salinen', 49002), ('Carlo', 12416), ('aufbürden', 40870), ('ansässigen', 13646), ('feststellten', 33416), ('position', 16440), ('sechsten', 12946), ('BDSG', 28813), ('Lachs', 24120), ('fundamentalistischen', 26220)]\n",
      "\t [(0, '<unk>'), (1, '<s>'), (2, '</s>'), (3, ','), (4, '.'), (5, 'die'), (6, 'der'), (7, 'und'), (8, 'in'), (9, 'zu')]\n",
      "\t Vocabulary size:  50000\n",
      "Target\n",
      "\t [('Carlo', 10590), ('Plato', 21977), ('Coconut', 49745), ('position', 311), ('duplications', 45666), ('disarm', 20083), ('622', 46724), ('reconstructing', 27679), ('light', 627), ('naturalist', 36451)]\n",
      "\t [(0, '<unk>'), (1, '<s>'), (2, '</s>'), (3, 'the'), (4, ','), (5, '.'), (6, 'of'), (7, 'and'), (8, 'to'), (9, 'in')]\n",
      "\t Vocabulary size:  50000\n"
     ]
    }
   ],
   "source": [
    "# ==========================================\n",
    "# Building source language vocabulary\n",
    "\n",
    "# Contains word string -> ID mapping\n",
    "src_dictionary = dict()\n",
    "\n",
    "# Read the vocabulary file\n",
    "with open('vocab.50K.de', encoding='utf-8') as f:\n",
    "    # Read and store every line\n",
    "    for line in f:\n",
    "        #we are discarding last char as it is new line char\n",
    "        src_dictionary[line[:-1]] = len(src_dictionary)\n",
    "\n",
    "# Build a reverse dictionary with the mapping ID -> word string\n",
    "src_reverse_dictionary = dict(zip(src_dictionary.values(),src_dictionary.keys()))\n",
    "\n",
    "# Print some of the words in the dictionary\n",
    "print('Source')\n",
    "print('\\t',list(src_dictionary.items())[:10])\n",
    "print('\\t',list(src_reverse_dictionary.items())[:10])\n",
    "print('\\t','Vocabulary size: ', len(src_dictionary))\n",
    "\n",
    "# ==========================================\n",
    "# Building source language vocabulary\n",
    "\n",
    "# Contains word string -> ID mapping\n",
    "tgt_dictionary = dict()\n",
    "\n",
    "# Read the vocabulary file\n",
    "with open('vocab.50K.en', encoding='utf-8') as f:\n",
    "    # Read and store every line\n",
    "    for line in f:\n",
    "        #we are discarding last char as it is new line char\n",
    "        tgt_dictionary[line[:-1]] = len(tgt_dictionary)\n",
    "\n",
    "# Build a reverse dictionary with the mapping ID -> word string\n",
    "tgt_reverse_dictionary = dict(zip(tgt_dictionary.values(),tgt_dictionary.keys()))\n",
    "\n",
    "# Print some of the words in the dictionary\n",
    "print('Target')\n",
    "print('\\t',list(tgt_dictionary.items())[:10])\n",
    "print('\\t',list(tgt_reverse_dictionary.items())[:10])\n",
    "print('\\t','Vocabulary size: ', len(tgt_dictionary))\n",
    "\n",
    "# Each language has 50000 words\n",
    "vocabulary_size = 50000"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Loading Training and Testing Data\n",
    "\n",
    "Here we load the data in the `train.de` and `train.en` files. And split the data in the files into two sets; training and testing data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sample translations (250000)\n",
      "( 0 ) DE:  Hier erfahren Sie , wie Sie Creative Suite 2 und Creative Suite 3 am besten zusammen mit QuarkXPress nutzen können .\n",
      "\n",
      "( 0 ) EN:  Here , you ’ ll find out how Creative Suite users can get the best possible interaction with QuarkXPress .\n",
      "\n",
      "( 10000 ) DE:  Für die sehr günstigen Wochen- und Monatskarten ( 1 Monat ca.\n",
      "\n",
      "( 10000 ) EN:  It is THE trendy area of Marseille .\n",
      "\n",
      "( 20000 ) DE:  Freuen Sie sich auf die romantische Atmosphäre in den Zimmern und Apartments .\n",
      "\n",
      "( 20000 ) EN:  Enjoy the romantic atmosphere of one of the guest rooms or apartments .\n",
      "\n",
      "( 30000 ) DE:  Zu zwiespältig sind Dr. Gutherzens Erfahrungen aus frühen Studententagen verlaufen , in denen er sich in die Gefielde von durch Heidegger geprägten Autor / innen begeben hat und dort ständig mit strengem Blick darauf verwiesen wurde , er habe bestimmte Theorieressourcen und Gedankengebäude einfach noch nicht gründlich genug verstanden und könne deshalb nicht begreifen , warum seine Einwände zu bestimmten Texten und Diskursen nicht stichhaltig seien .\n",
      "\n",
      "( 30000 ) EN:  This vagueness lends itself to an idealisation of violence , formulated in concepts of &quot; assault &quot; against imaginary authorities or enthusiastic notions of &quot; blissful traumatic knowledge &quot; .\n",
      "\n",
      "( 40000 ) DE:  Sie veranlassen den untergeordneten Prozess , sich während seiner gesamten Lebensdauer lediglich einmal mit dem SQL ##AT##-##AT## Server zu verbinden , anstatt bei jedem Aufruf einer Seite , die eine Verbindung benötigt .\n",
      "\n",
      "( 40000 ) EN:  They cause the child process to simply connect only once for its entire lifespan , instead of every time it processes a page that requires connecting to the SQL server .\n",
      "\n",
      "( 50000 ) DE:  Je intensiver man dabei bleibt , desto bessere Ergebnisse erzielt man .\n",
      "\n",
      "( 50000 ) EN:  The more intensively you do them , the better the results .\n",
      "\n",
      "( 60000 ) DE:  In allen Zimmern ist Digitalfernsehen und Internetzugang für sowohl Geschäftsreisende als auch Urlauber erhältlich .\n",
      "\n",
      "( 60000 ) EN:  All rooms offer digital TV and Internet access appealing to both corporate and leisure guests .\n",
      "\n",
      "( 70000 ) DE:  Bitte beachten Sie , dass Ihr Check ##AT##-##AT## in ##AT##-##AT## Code nicht mit der Buchungsnummer identisch ist .\n",
      "\n",
      "( 70000 ) EN:  Please note that the check ##AT##-##AT## in number and your reservation number are not the same .\n",
      "\n",
      "( 80000 ) DE:  Auch die Art , wie man einen eigenen Weißabgleich vornehmen kann , darf angepasst werden .\n",
      "\n",
      "( 80000 ) EN:  Another thing that should be reassessed is the way in which the user creates his own white balance .\n",
      "\n",
      "( 90000 ) DE:  Weitere Supportoptionen ( http : / / support.microsoft.com / contactus ) : Stellen Sie Ihre Fragen im Web , wenden Sie sich an Microsoft Support Services , oder teilen Sie uns Ihre Meinung mit .\n",
      "\n",
      "( 90000 ) EN:  Other Support Options ( http : / / support.microsoft.com / default.aspx ? pr = csshome ) : Use the Web to ask a question , contact Microsoft Customer Support Services , or provide feedback .\n",
      "\n",
      "( 100000 ) DE:  Ik vond het geen 4 ##STAR## waard . Het appartement oogde erg schroezelig en gedateerd , personeel sprak erg gebrekkig Engels .\n",
      "\n",
      "( 100000 ) EN:  Trousse d &apos;information manquante et devrait inclure une carte du site ainsi que des services et activités sur les lieu ou dans la commune ainsi les attraits touristiques de la région .\n",
      "\n",
      "( 110000 ) DE:  Dieses Bild spiegelt sich in Ihrem Unternehmen und Ihren Produkten wieder .\n",
      "\n",
      "( 110000 ) EN:  This image reflects on your company and products .\n",
      "\n",
      "( 120000 ) DE:  Alle Zimmer sind mit Digital ##AT##-##AT## TV und DVD und kostenlosem Breitbandanschluss sowie Direktwahltelefon ausgestattet .\n",
      "\n",
      "( 120000 ) EN:  Our rooms include a romantic four ##AT##-##AT## poster and two easy access ground floor rooms . All rooms are equipped to hotel standards with Digital TV and DVD , free broadband connections and free local and national direct dial phones .\n",
      "\n",
      "( 130000 ) DE:  Nothing if im quite honet . I wouldnt stay here again or recommend it to anyone i know .\n",
      "\n",
      "( 130000 ) EN:  the room was basic but spacoius and clean , the staff were friendly and helpful , the food was tasty , all in all , lovely place to stay !\n",
      "\n",
      "( 140000 ) DE:  Es gibt 4 verschiedene Möglichkeiten , Cannon Blast zu Ihrem Blog oder Ihrer Website hinzuzufügen .\n",
      "\n",
      "( 140000 ) EN:  There are 4 different ways of posting Cannon Blast to your blog or website .\n",
      "\n",
      "( 150000 ) DE:  Wenn die Buchung vor 14 : 00 Uhr 3 , Tage vor dem geplanten Anreisetag storniert wird , fällt keine Stornierungsgebühr an .\n",
      "\n",
      "( 150000 ) EN:  There will be no cancellation charge if a booking is cancelled before 14 : 00 3 days before your date of arrival .\n",
      "\n",
      "( 160000 ) DE:  Im geräumigen Hotelrestaurant Al Caminetto kosten Sie Gerichte aus Mailand und aus aller Welt .\n",
      "\n",
      "( 160000 ) EN:  The hotel ’ s restaurant , Al Caminetto , serves Milanese and international cuisine .\n",
      "\n",
      "( 170000 ) DE:  Während der 60 &apos; er Jahre gab es viele Regisseure die in die Wüste von Ameria zogen um , mit der ...\n",
      "\n",
      "( 170000 ) EN:  During the 1960s , numerous movie directors chose Almeria &apos;s desert ##AT##-##AT## like landscape to film some of ...\n",
      "\n",
      "( 180000 ) DE:  Tikje krappe kamer voor het aanwezige meubilair en de lift is absoluut niet meer van deze tijd : veel te klein .\n",
      "\n",
      "( 180000 ) EN:  Chambre minuscule , rien à voir avec les photos présentées , SDB &quot; vieillotte &quot; . Absence totale d &apos;insonorisation : l &apos;intimité de vos voisins de chambre en direct ....... Séjour écourté ......\n",
      "\n",
      "( 190000 ) DE:  Das Großunternehmen sieht sich einfach die Produkte des kleinen Unternehmens an und unterstellt so viele Patentverletzungen , wie es nur geht .\n",
      "\n",
      "( 190000 ) EN:  The large corporation will look at the products of the small company and bring up as many patent infringement assertions as possible .\n",
      "\n",
      "( 200000 ) DE:  Wochentags bis 22 Uhr , Samstags bis 18 Uhr geöffnet . Sehr sympathische Atmosphäre .\n",
      "\n",
      "( 200000 ) EN:  This is an interactive multimedia tour ( choice of languages ) through Weimar &apos;s history from prehistoric times to the present .\n",
      "\n",
      "( 210000 ) DE:  Wann möchten Sie im Entrecercas übernachten ?\n",
      "\n",
      "( 210000 ) EN:  When would you like to stay at the Entrecercas ?\n",
      "\n",
      "( 220000 ) DE:  In der ordentlichen Sitzung am 22. September 2008 befasste sich der Aufsichtsrat mit strategischen Themen aus den einzelnen Geschäftsbereichen wie der Positionierung des Kassamarktes im Wettbewerb mit außerbörslichen Handelsplattformen , den Innovationen im Derivatesegment und verschiedenen Aktivitäten im Nachhandelsbereich .\n",
      "\n",
      "( 220000 ) EN:  At the regular meeting on 22 September 2008 , the Supervisory Board dealt with strategic issues from the various business areas , such as the positioning of the cash market in competition with OTC trading platforms , innovation in the derivatives segment and various post ##AT##-##AT## trading activities .\n",
      "\n",
      "( 230000 ) DE:  Ich hatte keine Sekunde zum Entspannen .\n",
      "\n",
      "( 230000 ) EN:  I never had even one second to relax .\n",
      "\n",
      "( 240000 ) DE:  Das Englisch sprechende Personal steht Ihnen mit Rat und Tat zur Seite , informiert über Sehenswürdigkeiten und arrangiert Ihren Transfer .\n",
      "\n",
      "( 240000 ) EN:  The English ##AT##-##AT## speaking staff are always on hand to make your stay special .\n",
      "\n",
      "Sample test translations (100)\n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "EN:  Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "EN:  Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "DE:  Es existieren Busverbindungen in nahezu jeden Ort der Provence ( eventuell mit Umsteigen in Aix ##AT##-##AT## en ##AT##-##AT## Provence ) , allerdings sollte beachtet werden , dass die letzten Busse abends ca. um 19 Uhr fahren .\n",
      "\n",
      "EN:  As always in France those highways are expensive but practical , comfortable and fast .\n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "EN:  15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "DE:  Es war staubig , das Bad schmutzig . Sogar die Beleuchtung an der Wand im Flur ( Seitengebäude ) war richtig verstaubt .\n",
      "\n",
      "EN:  It was rather old fashioned in the decoration .\n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "EN:  From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "EN:  At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "EN:  Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "EN:  A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "DE:  Sehr freundliche Auszubildende an der Rezeption , die sehr bemüht noch einen Flug für mich gebucht hat .\n",
      "\n",
      "EN:  First of all I did not like the price ... the next day I went to Milano to a 4 star Hotel for 10 Euro less and super service .. I had a problem with my Internetconnection and the Hotel Maritim did not react right .\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Contains the training sentences\n",
    "source_sent = [] # Input\n",
    "target_sent = [] # Output\n",
    "\n",
    "# Contains the testing sentences\n",
    "test_source_sent = [] # Input\n",
    "test_target_sent = [] # Output\n",
    "\n",
    "# We grab around 100 lines of data that are interleaved \n",
    "# in the first 50000 sentences\n",
    "test_indices = [l_i for l_i in range(50,50001,500)]\n",
    "\n",
    "# Read the source data file and read the first 250,000 lines (except first 50)\n",
    "with open('train.de', encoding='utf-8') as f:\n",
    "    for l_i, line in enumerate(f):\n",
    "        # discarding first 50 translations as there was some\n",
    "        # english to english mappings found in the first few lines. which are wrong\n",
    "        if l_i<50:\n",
    "            continue\n",
    "        \n",
    "        if len(source_sent)<250000 and l_i not in test_indices:\n",
    "            source_sent.append(line)\n",
    "        elif l_i in test_indices:\n",
    "            test_source_sent.append(line)\n",
    "        \n",
    "# Read the target data file and read the first 250,000 lines (except first 50)            \n",
    "with open('train.en', encoding='utf-8') as f:\n",
    "    for l_i, line in enumerate(f):\n",
    "        # discarding first 50 translations as there was some\n",
    "        # english to english mappings found in the first few lines. which are wrong\n",
    "        if l_i<50:\n",
    "            continue\n",
    "        \n",
    "        if len(target_sent)<250000 and l_i not in test_indices:\n",
    "            target_sent.append(line)\n",
    "        elif l_i in test_indices:\n",
    "            test_target_sent.append(line)\n",
    "        \n",
    "# Make sure we extracted same number of both extracted source and target sentences         \n",
    "assert len(source_sent)==len(target_sent),'Source: %d, Target: %d'%(len(source_sent),len(target_sent))\n",
    "\n",
    "# Print some source sentences\n",
    "print('Sample translations (%d)'%len(source_sent))\n",
    "for i in range(0,250000,10000):\n",
    "    print('(',i,') DE: ', source_sent[i])\n",
    "    print('(',i,') EN: ', target_sent[i])\n",
    "\n",
    "# Print some target sentences\n",
    "print('Sample test translations (%d)'%len(test_source_sent))\n",
    "for i in range(0,100,10):\n",
    "    print('DE: ', test_source_sent[i])\n",
    "    print('EN: ', test_target_sent[i])\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Preprocessing text\n",
    "Here we preprocess the text by replacing words not found in the dictionary with `<unk>` as well as remove punctuation marks (`.`,`,`) and new-line characters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Source) Sentence mean length:  26.244692\n",
      "(Source) Sentence stddev length:  13.854376414156501\n",
      "(Target) Sentence mean length:  28.275308\n",
      "(Target) Sentence stddev length:  14.925498769057468\n",
      "(Test-Source) Sentence mean length:  26.61\n",
      "(Test-Source) Sentence stddev length:  14.800604717375572\n",
      "(Test-Target) Sentence mean length:  29.08\n",
      "(Test-Target) Sentence stddev length:  16.19424589167399\n"
     ]
    }
   ],
   "source": [
    "# Keep track of how many unknown words were encountered\n",
    "src_unk_count, tgt_unk_count = 0, 0\n",
    "\n",
    "def split_to_tokens(sent,is_source):\n",
    "    '''\n",
    "    This function takes in a sentence (source or target)\n",
    "    and preprocess the sentency with various steps (e.g. removing punctuation)\n",
    "    '''\n",
    "    \n",
    "    global src_unk_count, tgt_unk_count\n",
    "\n",
    "    # Remove punctuation and new-line chars\n",
    "    sent = sent.replace(',',' ,')\n",
    "    sent = sent.replace('.',' .')\n",
    "    sent = sent.replace('\\n',' ') \n",
    "    \n",
    "    sent_toks = sent.split(' ')\n",
    "    for t_i, tok in enumerate(sent_toks):\n",
    "        if is_source:\n",
    "            # src_dictionary contain the word -> word ID mapping for source vocabulary\n",
    "            if tok not in src_dictionary.keys():\n",
    "                if not len(tok.strip())==0:\n",
    "                    sent_toks[t_i] = '<unk>'\n",
    "                    src_unk_count += 1\n",
    "        else:\n",
    "            # tgt_dictionary contain the word -> word ID mapping for target vocabulary\n",
    "            if tok not in tgt_dictionary.keys():\n",
    "                if not len(tok.strip())==0:\n",
    "                    sent_toks[t_i] = '<unk>'\n",
    "                    #print(tok)\n",
    "                    tgt_unk_count += 1\n",
    "    return sent_toks\n",
    "\n",
    "# Let us first look at some statistics of the sentences\n",
    "# Train - source data\n",
    "source_len = []\n",
    "source_mean, source_std = 0,0\n",
    "for sent in source_sent:\n",
    "    source_len.append(len(split_to_tokens(sent,True)))\n",
    "\n",
    "print('(Source) Sentence mean length: ', np.mean(source_len))\n",
    "print('(Source) Sentence stddev length: ', np.std(source_len))\n",
    "\n",
    "# Let us first look at some statistics of the sentences\n",
    "# Train - target data\n",
    "target_len = []\n",
    "for sent in target_sent:\n",
    "    target_len.append(len(split_to_tokens(sent,False)))\n",
    "\n",
    "print('(Target) Sentence mean length: ', np.mean(target_len))\n",
    "print('(Target) Sentence stddev length: ', np.std(target_len))\n",
    "\n",
    "# Let us first look at some statistics of the sentences\n",
    "# Test - source data\n",
    "test_source_len = []\n",
    "for sent in test_source_sent:\n",
    "    test_source_len.append(len(split_to_tokens(sent, True)))\n",
    "    \n",
    "print('(Test-Source) Sentence mean length: ', np.mean(test_source_len))\n",
    "print('(Test-Source) Sentence stddev length: ', np.std(test_source_len))\n",
    "\n",
    "# Let us first look at some statistics of the sentences\n",
    "# Test - target data\n",
    "test_target_len = []\n",
    "test_tgt_mean, test_tgt_std = 0,0\n",
    "for sent in test_target_sent:\n",
    "    test_target_len.append(len(split_to_tokens(sent, False)))\n",
    "    \n",
    "print('(Test-Target) Sentence mean length: ', np.mean(test_target_len))\n",
    "print('(Test-Target) Sentence stddev length: ', np.std(test_target_len))\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Making training and testing data fixed length\n",
    "\n",
    "Here we get all the source sentences and target sentences to a fixed length. This is, so that we can process the sentences as batches."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Processing Training Data ...\n",
      "\n",
      "Unk counts Src: 464223, Tgt: 214783\n",
      "Sentences  250000\n",
      "\t Done processing training data \n",
      "\n",
      "Samples from training data\n",
      "\t ['<s>', 'Hier', 'erfahren', 'Sie', ',', 'wie', 'Sie', 'Creative', 'Suite', '2', 'und', 'Creative', 'Suite', '3', 'am', 'besten', 'zusammen', 'mit', 'QuarkXPress', 'nutzen', 'können', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Here', ',', 'you', '’', 'll', 'find', 'out', 'how', 'Creative', 'Suite', 'users', 'can', 'get', 'the', 'best', 'possible', 'interaction', 'with', 'QuarkXPress', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Sie', 'werden', 'überrascht', 'sein', ',', 'wie', 'einfach', 'sich', 'mit', 'Quark', 'das', 'volle', 'Potenzial', 'Ihrer', 'Design', '##AT##-##AT##', 'Software', 'erschließen', 'lässt', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'You', '’', 'll', 'be', 'surprised', 'how', 'easy', 'Quark', 'has', 'made', 'it', 'to', 'unlock', 'the', 'full', 'potential', 'of', 'all', 'your', 'design', 'software', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Häufig', 'wird', 'die', 'Meinung', 'vertreten', ',', 'dass', 'QuarkXPress', '8', 'von', 'allen', 'heute', 'verfügbaren', 'Layout', '##AT##-##AT##', 'Programmen', 'die', 'beste', 'Integration', 'mit', 'Photoshop', 'über', 'das', 'PSD', '##AT##-##AT##', 'Dateiformat', 'bietet', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'QuarkXPress', '8', 'is', 'considered', 'by', 'many', 'to', 'have', 'the', 'best', 'integration', 'with', 'Photoshop', '’', 's', 'PSD', 'file', 'format', 'of', 'any', 'layout', 'tool', 'available', 'today', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'In', 'diesem', 'Abschnitt', 'erläutern', 'wir', ',', 'wann', 'Sie', 'für', 'Ihre', 'Bilder', 'das', 'PSD', '##AT##-##AT##', 'Format', 'verwenden', 'sollten', 'und', 'wie', 'Sie', 'es', 'für', 'Ihre', 'Bilder', 'optimal', 'nutzen', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'In', 'this', 'section', 'we', '’', 'll', 'explain', 'when', 'you', 'should', 'use', 'the', 'PSD', 'format', 'for', 'your', 'images', 'and', 'how', 'to', 'get', 'the', 'most', 'out', 'of', 'them', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Angenommen', 'Sie', 'haben', 'verschiedene', 'Ebenen', 'in', 'Ihrer', 'PSD', '##AT##-##AT##', 'Datei', 'mit', 'verschiedenen', 'Darstellungen', 'eines', 'Produkts', ',', 'die', 'je', 'nach', 'Verwendungszweck', 'ausgewählt', 'werden', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'For', 'example', ',', 'you', 'may', 'have', 'multiple', 'layers', 'in', 'your', 'PSD', 'with', 'different', 'product', 'shots', ',', 'which', 'will', 'vary', 'from', 'publication', 'to', 'publication', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Wenn', 'Sie', 'mit', 'PSD', 'arbeiten', ',', 'können', 'Sie', 'diese', 'Ebenen', 'in', 'QuarkXPress', 'ein-', 'oder', 'ausschalten', ',', 'ohne', 'für', 'jede', 'Veröffentlichung', 'eine', 'eigene', 'TIFF', '##AT##-##AT##', 'Datei', 'generieren', 'zu', 'müssen', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'If', 'you', 'use', 'PSD', ',', 'you', 'can', 'switch', 'those', 'layers', 'on', 'or', 'off', 'in', 'QuarkXPress', 'without', 'having', 'to', 'save', 'a', 'separate', 'TIFF', 'for', 'each', 'publication', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Eine', 'andere', 'mögliche', 'Frage', 'für', 'die', 'Entscheidung', 'zwischen', 'PSD', 'und', 'TIFF', 'ist', ':', '„', 'Muss', 'ich', 'für', 'dieses', 'Bild', 'eine', '<unk>', 'verwenden', '?', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Another', 'question', 'that', 'might', 'tip', 'you', 'in', 'favor', 'of', 'PSD', 'is', ',', '&quot;', 'Do', 'I', 'need', 'to', 'use', 'a', 'spot', 'color', 'with', 'this', 'image', '?', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '&quot;', 'In', 'den', 'meisten', '<unk>', 'sind', '<unk>', 'oft', 'problematisch', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '&quot;', 'Using', 'spot', 'colors', 'in', 'most', 'image', 'formats', 'is', 'often', 'complicated', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Da', 'QuarkXPress', 'jedoch', 'PSD', '##AT##-##AT##', 'Kanäle', 'unterstützt', ',', 'geht', 'es', 'mit', 'PSD', 'einfacher', 'und', 'flexibler', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'However', ',', 'because', 'of', 'the', 'way', 'QuarkXPress', 'supports', 'PSD', 'channels', ',', 'it', '’', 's', 'simpler', 'and', 'more', 'flexible', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Erstellen', 'Sie', 'einen', 'Rahmen', 'und', 'gehen', 'Sie', 'dann', 'auf', 'Datei', '&gt;', 'Importieren', '.', '.', '.', 'oder', 'ziehen', 'Sie', 'das', 'Bild', 'einfach', 'per', 'Drag', '&amp;', 'Drop', 'von', 'Ihrem', 'Desktop', ',', 'aus', 'dem', 'Finder', 'oder', 'einer', 'Anwendung', 'wie', 'Adobe', 'Bridge', '<unk>', '–']\n",
      "\t ['<s>', 'Bringing', 'the', 'PSD', 'files', 'into', 'QuarkXPress', 'is', 'the', 'same', 'as', 'any', 'other', 'image', '.', 'Create', 'a', 'Box', 'and', 'then', 'use', 'File', '&gt;', 'Import', '.', '.', '.', 'or', 'simply', 'drag', 'and', 'drop', 'the', 'image', 'from', 'your', 'desktop', ',', 'Finder', 'or', 'an', 'application', 'like', 'Adobe', 'Bridge', '®', 'with', 'or', 'without', 'creating', 'a', 'box', 'first', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\n",
      "\tSentences  250000\n",
      "Processing testing data ....\n",
      "\n",
      "Unk counts Tgt: 212, Tgt: 107\n",
      "Done processing testing data ....\n",
      "\n",
      "Samples from training data\n",
      "\t ['<s>', 'Heute', 'verstehen', 'sich', 'QuarkXPress', '®', '8', ',', 'Photoshop', '®', 'und', 'Illustrator', '®', 'besser', 'als', 'jemals', 'zuvor', '.', 'Dank', 'HTML', 'und', 'CSS', '\\xad', 'können', 'Anwender', 'von', 'QuarkXPress', 'inzwischen', 'alle', 'Medien', 'bedienen', ',', 'und', 'das', 'unabhängig', 'von', 'Anwendungen', 'der', 'Adobe', '®', 'Creative']\n",
      "\t ['<s>', 'Today', ',', 'QuarkXPress', '®', '8', 'has', 'tighter', 'integration', 'with', 'Photoshop', '®', 'and', 'Illustrator', '®', 'than', 'ever', 'before', ',', 'and', 'through', 'standards', 'like', 'HTML', 'and', 'CSS', ',', 'QuarkXPress', 'users', 'can', 'publish', 'across', 'media', 'both', 'independently', 'and', 'alongside', 'Adobe', '®', 'Creative', 'Suite', '®', 'applications', 'like', 'Adobe', 'Flash', '®', '(', 'SWF', ')', 'and', 'Adobe', 'Dreamweaver', '®', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Je', 'mehr', 'Zeit', 'wir', 'mit', 'Gilad', 'und', 'dem', 'Rest', 'des', 'Teams', 'in', 'Israel', 'verbracht', 'haben', '(', 'um', 'nicht', 'den', 'lauten', 'Hahn', 'zu', 'erwähnen', 'der', '<unk>', 'bei', 'denen', 'über', 'den', 'Campus', '<unk>', ')', 'desto', 'überzeugter', 'waren', 'wir', '–', 'zusammen', 'können', 'wir']\n",
      "\t ['<s>', 'The', 'more', 'time', 'we', 'spent', 'with', 'Gilad', 'as', 'well', 'as', 'the', 'rest', 'of', 'the', 'team', 'in', 'Israel', '(', 'not', 'to', 'mention', 'the', 'very', 'loud', '<unk>', 'that', 'runs', 'around', 'in', 'their', 'campus', ')', ',', 'the', 'more', 'convinced', 'we', 'all', 'became', '-', 'we', '’', 'll', 'be', 'better', 'off', 'together', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '34', 'Diese', 'a', 'Worte', 'sind', 'wahr', 'und', 'treu', ';', 'darum', '<unk>', 'sie', 'nicht', ',', 'und', 'b', 'nehmt', 'auch', 'nichts', 'davon', 'weg', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '34', 'These', 'sayings', 'are', 'a', 'true', 'and', 'faithful', ';', 'wherefore', ',', 'transgress', 'them', 'not', ',', 'neither', 'b', 'take', 'therefrom', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '&#124;', 'Ferienwohnungen', '1', 'Zi', '&#124;', 'Ferienhäuser', '&#124;', 'Landhäuser', '&#124;', 'Autovermietung', '&#124;', 'Last', 'Minute', 'Angebote', '!', '!', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', '&#124;', '1', 'Bedroom', 'Apts', '&#124;', 'Holiday', 'houses', '&#124;', 'Rural', 'Homes', '&#124;', 'Car', 'Rental', '&#124;', 'Last', 'Minute', 'Offers', '!', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Der', '<unk>', 'Teil', 'der', 'Insel', 'besteht', 'aus', 'Granit', 'und', '<unk>', ',', 'von', 'Ton', 'überlagert', ',', 'und', 'bildet', 'eine', 'ca', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'A', 'battle', 'between', 'Denmark', 'and', 'Sweden', 'in', '<unk>', 'led', 'to', 'Swedish', 'control', 'of', 'the', 'island', ',', 'but', 'it', 'was', 'brief', '-', 'they', 'left', 'again', 'the', 'same', 'year', '.', 'In', 'the', '<unk>', 'of', '<unk>', '<unk>', ',', '<unk>', ',', '<unk>', 'and', '<unk>', 'were', 'given', 'to', 'Sweden', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Mag', 'sein', ',', 'dass', 'du', 'deine', 'ersten', '<unk>', 'in', 'einem', '<unk>', ',', '<unk>', 'Kahn', '<unk>', '-', 'aber', 'mit', 'der', 'Zeit', 'wirst', 'du', 'dich', 'zum', '<unk>', '<unk>', 'oder', 'edlen', 'Katamaran', '<unk>', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'You', 'may', 'be', 'starting', 'in', 'a', '<unk>', 'old', 'tub', 'of', 'a', 'boat', ',', 'but', 'in', 'no', 'time', 'at', 'all', 'you', '&apos;ll', 'be', 'able', 'to', 'buy', 'a', 'fancy', '<unk>', ',', 'or', 'a', 'classy', 'catamaran', '.', 'Turn', 'your', 'newfound', 'fame', 'into', 'money', ',', 'and', 'spend', 'it', 'to', 'buy', 'lavish', 'new', 'homes', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'In', 'der', '<unk>', 'im', 'Internet', 'müßte', 'die', 'Zufahrt', 'beschrieben', 'werden', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'There', 'are', 'no', 'adverse', 'comments', 'about', 'this', 'hotel', 'at', 'all', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Ideale', 'Lage', 'für', 'Exkursionen', 'in', 'die', 'Stadt', 'und', 'Nähe', 'zur', 'Promenade', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'There', 'was', 'plenty', 'of', 'space', 'in', 'the', 'room', 'and', 'a', 'nice', 'garden', 'to', 'sit', 'and', 'have', 'a', 'drink', 'and', 'smoke', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Das', 'Hotel', '<unk>', 'verfügt', 'über', 'eine', 'ideale', ',', 'ruhige', 'Lage', 'in', 'einem', 'geschäftigen', 'Viertel', 'mit', 'guter', 'Verkehrsanbindung', '.', 'Der', 'Bahnhof', 'und', 'eine', 'U', '##AT##-##AT##', 'Bahnstation', 'liegen', 'in', 'der', 'Nähe', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Hotel', '<unk>', 'welcomes', 'you', 'to', 'a', 'busy', 'yet', 'quiet', 'area', 'of', 'Milan', ',', 'within', 'walking', 'distance', 'of', 'excellent', 'transport', 'links', ',', 'including', 'the', 'central', 'railway', 'station', 'and', 'the', 'Repubblica', 'metro', 'station', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Zum', 'klimatisierten', 'Hotel', 'gehören', 'auch', 'ein', '<unk>', 'und', 'eine', 'traumhafte', 'Sonnenterrasse', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "\t ['<s>', 'Apart', 'from', 'this', ',', 'the', 'guests', 'can', 'enjoy', 'the', 'facility', 'of', 'an', 'independent', 'air', '##AT##-##AT##', 'conditioning', 'system', ',', 'a', 'jacuzzi', 'and', 'a', 'beautiful', 'sun', 'terrace', '.', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>']\n"
     ]
    }
   ],
   "source": [
    "# ================================================================================\n",
    "# Processing training data\n",
    "\n",
    "src_unk_count, tgt_unk_count = 0, 0\n",
    "\n",
    "train_inputs = []\n",
    "train_outputs = []\n",
    "\n",
    "# Chosen based on previously found statistics\n",
    "src_max_sent_length = 41 \n",
    "tgt_max_sent_length = 61\n",
    "\n",
    "print('Processing Training Data ...\\n')\n",
    "for s_i, (src_sent, tgt_sent) in enumerate(zip(source_sent,target_sent)):\n",
    "    # Break source and target sentences to word lists\n",
    "    src_sent_tokens = split_to_tokens(src_sent,True)\n",
    "    tgt_sent_tokens = split_to_tokens(tgt_sent,False)\n",
    "    \n",
    "    # Append <s> token's ID to the beggining of source sentence\n",
    "    num_src_sent = [src_dictionary['<s>']]\n",
    "    # Add the rest of word IDs for words found in the source sentence \n",
    "    for tok in src_sent_tokens:\n",
    "        if tok in src_dictionary.keys():\n",
    "            num_src_sent.append(src_dictionary[tok])\n",
    "\n",
    "    # If the lenghth of the source sentence below the maximum allowed length\n",
    "    # append </s> token's ID to the end\n",
    "    if len(num_src_sent)<src_max_sent_length:\n",
    "        num_src_sent.extend([src_dictionary['</s>'] for _ in range(src_max_sent_length - len(num_src_sent))])\n",
    "\n",
    "    # If the length exceed the maximum allowed length\n",
    "    # truncate the sentence\n",
    "    elif len(num_src_sent)>src_max_sent_length:\n",
    "        num_src_sent = num_src_sent[:src_max_sent_length]\n",
    "        \n",
    "    # Make sure the sentence is of length src_max_sent_length\n",
    "    assert len(num_src_sent)==src_max_sent_length,len(num_src_sent)\n",
    "\n",
    "    train_inputs.append(num_src_sent)\n",
    "    \n",
    "    # Create the numeric target sentence with word IDs\n",
    "    # append <s> to the beginning and append actual words later\n",
    "    num_tgt_sent = [tgt_dictionary['<s>']]\n",
    "    for tok in tgt_sent_tokens:\n",
    "        if tok in tgt_dictionary.keys():\n",
    "            num_tgt_sent.append(tgt_dictionary[tok])\n",
    "        \n",
    "    ## Modifying the outputs such that all the outputs have max_length elements\n",
    "    if len(num_tgt_sent)<tgt_max_sent_length:\n",
    "        num_tgt_sent.extend([tgt_dictionary['</s>'] for _ in range(tgt_max_sent_length - len(num_tgt_sent))])\n",
    "    elif len(num_tgt_sent)>tgt_max_sent_length:\n",
    "        num_tgt_sent = num_tgt_sent[:tgt_max_sent_length]\n",
    "        \n",
    "    train_outputs.append(num_tgt_sent)\n",
    "    \n",
    "print('Unk counts Src: %d, Tgt: %d'%(src_unk_count, tgt_unk_count))\n",
    "print('Sentences ',len(train_inputs))\n",
    "\n",
    "assert len(train_inputs)  == len(source_sent),\\\n",
    "        'Size of total elements: %d, Total sentences: %d'\\\n",
    "                %(len(train_inputs),len(source_sent))\n",
    "\n",
    "# Making inputs and outputs NumPy arrays\n",
    "train_inputs = np.array(train_inputs, dtype=np.int32)\n",
    "train_outputs = np.array(train_outputs, dtype=np.int32)\n",
    "\n",
    "# Make sure number of inputs and outputs dividable by 100\n",
    "train_inputs = train_inputs[:(train_inputs.shape[0]//100)*100,:]\n",
    "train_outputs = train_outputs[:(train_outputs.shape[0]//100)*100,:]\n",
    "print('\\t Done processing training data \\n')\n",
    "\n",
    "# Printing some data\n",
    "print('Samples from training data')\n",
    "for ti in range(10):\n",
    "    print('\\t',[src_reverse_dictionary[w]  for w in train_inputs[ti,:].tolist()])\n",
    "    print('\\t',[tgt_reverse_dictionary[w]  for w in train_outputs[ti,:].tolist()])\n",
    "print()\n",
    "print('\\tSentences ',train_inputs.shape[0])\n",
    "\n",
    "# ================================================================================\n",
    "# Processing Test data\n",
    "\n",
    "src_unk_count, tgt_unk_count = 0, 0\n",
    "print('Processing testing data ....\\n')\n",
    "test_inputs = []\n",
    "test_outputs = []\n",
    "for s_i, (src_sent,tgt_sent) in enumerate(zip(test_source_sent,test_target_sent)):\n",
    "    src_sent_tokens = split_to_tokens(src_sent,True)\n",
    "    tgt_sent_tokens = split_to_tokens(tgt_sent,False)\n",
    "    \n",
    "    num_src_sent = [src_dictionary['<s>']]\n",
    "    for tok in src_sent_tokens:\n",
    "        if tok in src_dictionary.keys():\n",
    "            num_src_sent.append(src_dictionary[tok])\n",
    "    \n",
    "    num_tgt_sent = [src_dictionary['<s>']]\n",
    "    for tok in tgt_sent_tokens:\n",
    "        if tok in tgt_dictionary.keys():\n",
    "            num_tgt_sent.append(tgt_dictionary[tok])\n",
    "        \n",
    "    # Append </s> if the length is not src_max_sent_length\n",
    "    if len(num_src_sent)<src_max_sent_length:\n",
    "        num_src_sent.extend([src_dictionary['</s>'] for _ in range(src_max_sent_length - len(num_src_sent))])\n",
    "    # Truncate the sentence if length is over src_max_sent_length\n",
    "    elif len(num_src_sent)>src_max_sent_length:\n",
    "        num_src_sent = num_src_sent[:src_max_sent_length]\n",
    "        \n",
    "    assert len(num_src_sent)==src_max_sent_length, len(num_src_sent)\n",
    "\n",
    "    test_inputs.append(num_src_sent)\n",
    "    \n",
    "    # Append </s> is length is not tgt_max_sent_length\n",
    "    if len(num_tgt_sent)<tgt_max_sent_length:\n",
    "        num_tgt_sent.extend([tgt_dictionary['</s>'] for _ in range(tgt_max_sent_length - len(num_tgt_sent))])\n",
    "    # Truncate the sentence if length over tgt_max_sent_length\n",
    "    elif len(num_tgt_sent)>tgt_max_sent_length:\n",
    "        num_tgt_sent = num_tgt_sent[:tgt_max_sent_length]\n",
    "        \n",
    "    assert len(num_tgt_sent)==tgt_max_sent_length, len(num_tgt_sent)\n",
    "\n",
    "    test_outputs.append(num_tgt_sent)\n",
    "\n",
    "# Printing some data\n",
    "print('Unk counts Tgt: %d, Tgt: %d'%(src_unk_count, tgt_unk_count))    \n",
    "print('Done processing testing data ....\\n')\n",
    "test_inputs = np.array(test_inputs,dtype=np.int32)\n",
    "test_outputs = np.array(test_outputs,dtype=np.int32)\n",
    "print('Samples from training data')\n",
    "for ti in range(10):\n",
    "    print('\\t',[src_reverse_dictionary[w]  for w in test_inputs[ti,:].tolist()])\n",
    "    print('\\t',[tgt_reverse_dictionary[w]  for w in test_outputs[ti,:].tolist()])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Learning word embeddings\n",
    "\n",
    "In this section, we learn word embeddings for both the languages using the sentences we have. After learning word embeddings, this will create two arrays (`en-embeddings-tmp.npy` and `de-embeddings-tmp.npy`) and store them on disk. To use this in the successive computations, go ahead and change the names to `en-embeddings.npy` and `de-embeddings.npy` respectively. ** You can skip this if you have run the code previously. **"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total number of training sentences:  250000\n",
      "\n",
      "with window_size = 1:\n",
      "    batch: [['<s>', 'Florian'], ['<s>', 'Hotel'], ['<s>', 'Und'], ['<s>', 'alle'], ['<s>', '##AT##-##AT##'], ['<s>', 'ist'], ['<s>', 'können'], ['<s>', '-']]\n",
      "    labels: ['Major', 'Das', '33', 'Für', '<unk>', 'Cadiz', 'Sie', '<unk>']\n",
      "\n",
      "with window_size = 2:\n",
      "    batch: [['<s>', 'Kleinigkeiten', 'es', ','], ['<s>', 'Badezimmer', '<unk>', 'Duschkabine'], ['<s>', 'Die', 'der', 'Räume'], ['<s>', 'Zur', 'Ihrer', 'Buchung'], ['<s>', 'Booking', ':', '<unk>'], ['<s>', '<unk>', '&apos;', 'autoroute'], ['<s>', 'Und', 'Wissen', 'über'], ['<s>', 'Das', 'ist', 'hier']]\n",
      "    labels: ['sind', 'mit', 'meisten', 'Sicherung', '<unk>', 'l', 'ohne', 'Restaurant']\n",
      "Defining 4 embedding lookups representing each word in the context\n",
      "Stacked embedding size: [64, 128, 4]\n",
      "Reduced mean embedding size: [64, 128]\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_impl.py:1346: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "\n",
      "Future major versions of TensorFlow will allow gradients to flow\n",
      "into the labels input on backprop by default.\n",
      "\n",
      "See tf.nn.softmax_cross_entropy_with_logits_v2.\n",
      "\n",
      "Initialized\n",
      "Average loss at step 2000: 3.535072\n",
      "Average loss at step 4000: 2.705608\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-6-f4f5b44c05c2>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     23\u001b[0m \u001b[0;31m# Run embedding learning for source language\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     24\u001b[0m \u001b[0;31m# Stores the de-embeddings-tmp.npy into the disk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0mword2vec\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_word2vec_source\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbatch_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     26\u001b[0m \u001b[0;31m# Run embedding learning for target language\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     27\u001b[0m \u001b[0;31m# Stores the en-embeddings-tmp.npy to the disk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/docker-thushv-jupyter/packt_nlp_tensorflow/ch10/word2vec.py\u001b[0m in \u001b[0;36mrun_word2vec_source\u001b[0;34m(batch_size)\u001b[0m\n\u001b[1;32m    220\u001b[0m             \u001b[0mbatch_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbatch_labels\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgenerate_batch_for_word2vec\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbatch_size\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwindow_size\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mis_source\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    221\u001b[0m             \u001b[0mfeed_dict\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mtrain_dataset\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbatch_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtrain_labels\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mbatch_labels\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 222\u001b[0;31m             \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ml\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0moptimizer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloss\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeed_dict\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfeed_dict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    223\u001b[0m             \u001b[0maverage_loss\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0ml\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    224\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0;36m2000\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, fetches, feed_dict, options, run_metadata)\u001b[0m\n\u001b[1;32m    903\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    904\u001b[0m       result = self._run(None, fetches, feed_dict, options_ptr,\n\u001b[0;32m--> 905\u001b[0;31m                          run_metadata_ptr)\n\u001b[0m\u001b[1;32m    906\u001b[0m       \u001b[0;32mif\u001b[0m \u001b[0mrun_metadata\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    907\u001b[0m         \u001b[0mproto_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtf_session\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTF_GetBuffer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrun_metadata_ptr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py\u001b[0m in \u001b[0;36m_run\u001b[0;34m(self, handle, fetches, feed_dict, options, run_metadata)\u001b[0m\n\u001b[1;32m   1135\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mfinal_fetches\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mfinal_targets\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mhandle\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mfeed_dict_tensor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1136\u001b[0m       results = self._do_run(handle, final_targets, final_fetches,\n\u001b[0;32m-> 1137\u001b[0;31m                              feed_dict_tensor, options, run_metadata)\n\u001b[0m\u001b[1;32m   1138\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1139\u001b[0m       \u001b[0mresults\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py\u001b[0m in \u001b[0;36m_do_run\u001b[0;34m(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)\u001b[0m\n\u001b[1;32m   1353\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mhandle\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1354\u001b[0m       return self._do_call(_run_fn, self._session, feeds, fetches, targets,\n\u001b[0;32m-> 1355\u001b[0;31m                            options, run_metadata)\n\u001b[0m\u001b[1;32m   1356\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1357\u001b[0m       \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_do_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_prun_fn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_session\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeeds\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfetches\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py\u001b[0m in \u001b[0;36m_do_call\u001b[0;34m(self, fn, *args)\u001b[0m\n\u001b[1;32m   1359\u001b[0m   \u001b[0;32mdef\u001b[0m \u001b[0m_do_call\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1360\u001b[0m     \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1361\u001b[0;31m       \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1362\u001b[0m     \u001b[0;32mexcept\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOpError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1363\u001b[0m       \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcompat\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mas_text\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py\u001b[0m in \u001b[0;36m_run_fn\u001b[0;34m(session, feed_dict, fetch_list, target_list, options, run_metadata)\u001b[0m\n\u001b[1;32m   1338\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1339\u001b[0m           return tf_session.TF_Run(session, options, feed_dict, fetch_list,\n\u001b[0;32m-> 1340\u001b[0;31m                                    target_list, status, run_metadata)\n\u001b[0m\u001b[1;32m   1341\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1342\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_prun_fn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeed_dict\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfetch_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "# Total number of sentences\n",
    "tot_sentences = train_inputs.shape[0]\n",
    "print('Total number of training sentences: ',tot_sentences)\n",
    "\n",
    "# we keep a cursor for each sentence in the training set\n",
    "sentence_cursors = [0 for _ in range(tot_sentences)] \n",
    "\n",
    "batch_size = 64\n",
    "embedding_size = 128 # Dimension of the embedding vector.\n",
    "\n",
    "# Defining various things needed by the python script\n",
    "word2vec.define_data_and_hyperparameters(\n",
    "        tot_sentences, src_max_sent_length, tgt_max_sent_length, src_dictionary, tgt_dictionary,\n",
    "        src_reverse_dictionary, tgt_reverse_dictionary, train_inputs, train_outputs, embedding_size,\n",
    "    vocabulary_size)\n",
    "\n",
    "# Print some batches to make sure the data generator is correct\n",
    "word2vec.print_some_batches()\n",
    "\n",
    "# Define TensorFlow ops for learning word embeddings\n",
    "word2vec.define_word2vec_tensorflow(batch_size)\n",
    "\n",
    "# Run embedding learning for source language\n",
    "# Stores the de-embeddings-tmp.npy into the disk\n",
    "word2vec.run_word2vec_source(batch_size)\n",
    "# Run embedding learning for target language\n",
    "# Stores the en-embeddings-tmp.npy to the disk\n",
    "word2vec.run_word2vec_target(batch_size)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Flipping the Input Data\n",
    "Changin the order of the sentence of the target language improves the performance of NMT systems. Because when reversed, it helps the NMT system to establish a strong connection as the last word of the source language and the last word of the target language will be closest to each other. *DON'T RUN THIS MULTIPLE TIMES as running two times gives original.*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training and Test source data after flipping \n",
      "\t ['</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '.', 'können', 'nutzen', 'QuarkXPress', 'mit', 'zusammen', 'besten', 'am', '3', 'Suite', 'Creative', 'und', '2', 'Suite', 'Creative', 'Sie', 'wie', ',', 'Sie', 'erfahren', 'Hier', '<s>']\n",
      "\t ['tray', 'road', 'mistakes', 'of', 'expect', 'a', 'tabled', 'with', 'and', 'the', 'posts', 'useful', 'out', 'waiting', 'wounded', 'a', 'drinks', 'been', 'stand', '26th', 'and', 'senior', 'personal', ',', 'difficulties', 'qualifications', 'an', 'rather', 'road', 'rewriting', 'and', 'road', 'unsustainable', 'the', '2007', 'road', 'wounded', 'not', 'throughout', 'amendment', '<s>']\n",
      "\n",
      "\t ['</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '.', ')', 'Import', '##AT##-##AT##', 'PSD', '&gt;', 'Fenster', '(', 'Import', '##AT##-##AT##', 'PSD', 'Palette', 'die', 'Sie', 'öffnen', ',', 'können', 'zu', 'nutzen', 'Dateien', '##AT##-##AT##', 'PSD', 'von', 'Funktionen', 'speziellen', 'die', 'Um', '<s>']\n",
      "\t ['</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', '</s>', ',', '<unk>', 'and', 'important', '<unk>', 'important', 'the', '<unk>', '<unk>', 'the', 'CC', 'revolution', 'are', 'proposals', 'of', 'to', 'not', 'With', 'Overall', 'countries', 'more', '<s>']\n",
      "\n",
      "\n",
      "Testing data after flipping\n",
      "\t ['Creative', '®', 'Adobe', 'der', 'Anwendungen', 'von', 'unabhängig', 'das', 'und', ',', 'bedienen', 'Medien', 'alle', 'inzwischen', 'QuarkXPress', 'von', 'Anwender', 'können', '\\xad', 'CSS', 'und', 'HTML', 'Dank', '.', 'zuvor', 'jemals', 'als', 'besser', '®', 'Illustrator', 'und', '®', 'Photoshop', ',', '8', '®', 'QuarkXPress', 'sich', 'verstehen', 'Heute', '<s>']\n"
     ]
    }
   ],
   "source": [
    "## Reverse the Germen sentences\n",
    "# Remember reversing the source sentence gives better performance\n",
    "# DON'T RUN THIS MULTIPLE TIMES as running two times gives original\n",
    "train_inputs = np.fliplr(train_inputs)\n",
    "test_inputs = np.fliplr(test_inputs)\n",
    "\n",
    "print('Training and Test source data after flipping ')\n",
    "print('\\t',[src_reverse_dictionary[w] for w in train_inputs[0,:].tolist()])\n",
    "print('\\t',[tgt_reverse_dictionary[w] for w in test_inputs[0,:].tolist()])\n",
    "print()\n",
    "print('\\t',[src_reverse_dictionary[w] for w in train_inputs[10,:].tolist()])\n",
    "print('\\t',[tgt_reverse_dictionary[w] for w in test_inputs[10,:].tolist()])\n",
    "\n",
    "print()\n",
    "print('\\nTesting data after flipping')\n",
    "print('\\t',[src_reverse_dictionary[w] for w in test_inputs[0,:].tolist()])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Data Generations for MT\n",
    "\n",
    "Now we define the data generator for our NMT."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Source data\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '.', '</s>', '</s>']\n",
      "['</s>', '</s>', 'bietet', '.', '</s>']\n",
      "['</s>', '</s>', 'Dateiformat', 'nutzen', '</s>']\n",
      "['</s>', '</s>', '##AT##-##AT##', 'optimal', '</s>']\n",
      "['</s>', '</s>', 'PSD', 'Bilder', '</s>']\n",
      "['</s>', '</s>', 'das', 'Ihre', '.']\n",
      "['</s>', '</s>', 'über', 'für', 'werden']\n",
      "['.', '</s>', 'Photoshop', 'es', 'ausgewählt']\n",
      "['können', '.', 'mit', 'Sie', 'Verwendungszweck']\n",
      "\n",
      "Target data batch\n",
      "['Here', 'QuarkXPress', 'In', 'For', 'If']\n",
      "[',', '8', 'this', 'example', 'you']\n",
      "['you', 'is', 'section', ',', 'use']\n",
      "['’', 'considered', 'we', 'you', 'PSD']\n",
      "['ll', 'by', '’', 'may', ',']\n",
      "['find', 'many', 'll', 'have', 'you']\n",
      "['out', 'to', 'explain', 'multiple', 'can']\n",
      "['how', 'have', 'when', 'layers', 'switch']\n",
      "['Creative', 'the', 'you', 'in', 'those']\n",
      "['Suite', 'best', 'should', 'your', 'layers']\n",
      "['users', 'integration', 'use', 'PSD', 'on']\n",
      "['can', 'with', 'the', 'with', 'or']\n",
      "['get', 'Photoshop', 'PSD', 'different', 'off']\n",
      "['the', '’', 'format', 'product', 'in']\n",
      "['best', 's', 'for', 'shots', 'QuarkXPress']\n",
      "['possible', 'PSD', 'your', ',', 'without']\n",
      "['interaction', 'file', 'images', 'which', 'having']\n",
      "['with', 'format', 'and', 'will', 'to']\n",
      "['QuarkXPress', 'of', 'how', 'vary', 'save']\n",
      "['.', 'any', 'to', 'from', 'a']\n",
      "['</s>', 'layout', 'get', 'publication', 'separate']\n",
      "['</s>', 'tool', 'the', 'to', 'TIFF']\n",
      "['</s>', 'available', 'most', 'publication', 'for']\n",
      "['</s>', 'today', 'out', '.', 'each']\n",
      "['</s>', '.', 'of', '</s>', 'publication']\n",
      "['</s>', '</s>', 'them', '</s>', '.']\n",
      "['</s>', '</s>', '.', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n",
      "['</s>', '</s>', '</s>', '</s>', '</s>']\n"
     ]
    }
   ],
   "source": [
    "emb_mat = np.load('de-embeddings.npy')\n",
    "embedding_size = emb_mat.shape[1]\n",
    "input_size = embedding_size\n",
    "\n",
    "class DataGeneratorMT(object):\n",
    "    \n",
    "    def __init__(self,batch_size,num_unroll,is_source, is_train):\n",
    "        # Number of data points in a batch\n",
    "        self._batch_size = batch_size\n",
    "        # Number of unrollings\n",
    "        self._num_unroll = num_unroll\n",
    "        # Cursors for each element in batch\n",
    "        self._cursor = [0 for offset in range(self._batch_size)]\n",
    "        \n",
    "        # Loading the learnt word embeddings\n",
    "        self._src_word_embeddings = np.load('de-embeddings.npy')\n",
    "        self._tgt_word_embeddings = np.load('en-embeddings.npy')\n",
    "        \n",
    "        # The sentence IDs being currently processed to create the \n",
    "        # current batch\n",
    "        self._sent_ids = None\n",
    "        \n",
    "        # We want a batch of data from source or target?\n",
    "        self._is_source = is_source\n",
    "        # Is this training or testing data?\n",
    "        self._is_train = is_train\n",
    "                \n",
    "    def next_batch(self, sent_ids):\n",
    "        \n",
    "        # Depending on wheter we want source or target data\n",
    "        # change the maximum sentence length\n",
    "        if self._is_source:\n",
    "            max_sent_length = src_max_sent_length\n",
    "        else:\n",
    "            max_sent_length = tgt_max_sent_length\n",
    "            \n",
    "        # Arrays to hold input and output data\n",
    "        # Word embeddings (current word)\n",
    "        batch_data = np.zeros((self._batch_size,input_size),dtype=np.float32)\n",
    "        # One-hot encoded label (next word)\n",
    "        batch_labels = np.zeros((self._batch_size,vocabulary_size),dtype=np.float32)\n",
    "        \n",
    "        \n",
    "        # Populate each index of the batch\n",
    "        for b in range(self._batch_size):\n",
    "            \n",
    "            # Sentence IDs to get data from\n",
    "            sent_id = sent_ids[b]\n",
    "            \n",
    "            # If generating data with source sentences\n",
    "            # use src_word_embeddings\n",
    "            if self._is_source:\n",
    "                # Depending on whether we need training data or testind data\n",
    "                # choose the previously created training or testing data\n",
    "                if self._is_train:\n",
    "                    sent_text = train_inputs[sent_id]\n",
    "                else:\n",
    "                    sent_text = test_inputs[sent_id]\n",
    "                             \n",
    "                # Populate the batch data arrays\n",
    "                batch_data[b] = self._src_word_embeddings[sent_text[self._cursor[b]],:]\n",
    "                batch_labels[b] = np.zeros((vocabulary_size),dtype=np.float32)\n",
    "                batch_labels[b,sent_text[self._cursor[b]+1]] = 1.0\n",
    "            # If generating data with target sentences\n",
    "            # use tgt_word_embeddings\n",
    "            else:\n",
    "                # Depending on whether we need training data or testind data\n",
    "                # choose the previously created training or testing data\n",
    "                if self._is_train:\n",
    "                    sent_text = train_outputs[sent_id]\n",
    "                else:\n",
    "                    sent_text = test_outputs[sent_id]\n",
    "                \n",
    "                # We cannot avoid having two different embedding vectors for <s> token\n",
    "                # in soruce and target languages\n",
    "                # Therefore, if the symbol appears, we always take the source embedding vector\n",
    "                if sent_text[self._cursor[b]]!=tgt_dictionary['<s>']:\n",
    "                    batch_data[b] = self._tgt_word_embeddings[sent_text[self._cursor[b]],:]\n",
    "                else:\n",
    "                    batch_data[b] = self._src_word_embeddings[sent_text[self._cursor[b]],:]\n",
    "                \n",
    "                # Populate the data arrays\n",
    "                batch_labels[b] = np.zeros((vocabulary_size),dtype=np.float32)\n",
    "                batch_labels[b,sent_text[self._cursor[b]+1]] = 1.0\n",
    "            \n",
    "            # Update the cursor for each batch index\n",
    "            self._cursor[b] = (self._cursor[b]+1)%(max_sent_length-1)\n",
    "             \n",
    "        return batch_data,batch_labels\n",
    "        \n",
    "    def unroll_batches(self,sent_ids):\n",
    "        \n",
    "        # Only if new sentence IDs if provided\n",
    "        # else it will use the previously defined \n",
    "        # sent_ids continuously\n",
    "        if sent_ids is not None:\n",
    "            \n",
    "            self._sent_ids = sent_ids\n",
    "            # Unlike in the previous exercises we do not process a single sequence\n",
    "            # over many iterations of unrollings. We process either a source sentence or target sentence\n",
    "            # at a single go. So we reset the _cursor evrytime we generate a batch\n",
    "            self._cursor = [0 for _ in range(self._batch_size)]\n",
    "                \n",
    "        unroll_data,unroll_labels = [],[]\n",
    "        \n",
    "        # Unrolling data over time\n",
    "        for ui in range(self._num_unroll):\n",
    "            \n",
    "            if self._is_source:\n",
    "                data, labels = self.next_batch(self._sent_ids)\n",
    "            else:\n",
    "                data, labels = self.next_batch(self._sent_ids)\n",
    "                    \n",
    "            unroll_data.append(data)\n",
    "            unroll_labels.append(labels)\n",
    "        \n",
    "        # Return unrolled data and sentence IDs\n",
    "        return unroll_data, unroll_labels, self._sent_ids\n",
    "    \n",
    "    def reset_indices(self):\n",
    "        self._cursor = [0 for offset in range(self._batch_size)]\n",
    "        \n",
    "# Running a tiny set to see if the implementation correct\n",
    "dg = DataGeneratorMT(batch_size=5,num_unroll=20,is_source=True, is_train=True)\n",
    "u_data, u_labels, _ = dg.unroll_batches([0,1,2,3,4])\n",
    "\n",
    "print('Source data')\n",
    "for _, lbl in zip(u_data,u_labels):\n",
    "    # the the string words for returned word IDs and display the results\n",
    "    print([src_reverse_dictionary[w] for w in np.argmax(lbl,axis=1).tolist()])\n",
    "\n",
    "        # Running a tiny set to see if the implementation correct\n",
    "dg = DataGeneratorMT(batch_size=5,num_unroll=30,is_source=False, is_train=True)\n",
    "u_data, u_labels, _ = dg.unroll_batches([0,2,3,4,5])\n",
    "print('\\nTarget data batch')\n",
    "for d_i,(_, lbl) in enumerate(zip(u_data,u_labels)):\n",
    "    # the the string words for returned word IDs and display the results\n",
    "    print([tgt_reverse_dictionary[w] for w in np.argmax(lbl,axis=1).tolist()])\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## Attention-Based NMT System\n",
    "\n",
    "Here we define the attention based NMT system. Unlike the standard NMT attention based NMT has the ability to refer to any of the encoder states during any step of the decoding. This is achieved through the attention layer."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining hyperparameters\n",
    "Here we define various hyperparameters we use to define our model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "num_nodes = 128\n",
    "batch_size = 10\n",
    "\n",
    "# We unroll the full length at one go\n",
    "# both source and target sentences\n",
    "enc_num_unrollings = 40\n",
    "dec_num_unrollings = 60\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining Input/Output Placeholders\n",
    "Here we define the placeholder to feed in inputs/outputs. Additionally we define a mask placeholder that can mask certain outputs from the loss calculation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "tf.reset_default_graph()\n",
    "\n",
    "tgt_word_embeddings = tf.convert_to_tensor(np.load('en-embeddings.npy'))\n",
    "\n",
    "# Training Input data.\n",
    "enc_train_inputs = []\n",
    "\n",
    "# Defining unrolled training inputs\n",
    "for ui in range(enc_num_unrollings):\n",
    "    enc_train_inputs.append(tf.placeholder(tf.float32, shape=[batch_size,input_size],name='train_inputs_%d'%ui))\n",
    "\n",
    "# Training Input data.\n",
    "dec_train_inputs, dec_train_labels = [],[]\n",
    "dec_train_masks = []\n",
    "\n",
    "# Defining unrolled training inputs\n",
    "for ui in range(dec_num_unrollings):\n",
    "    dec_train_inputs.append(tf.placeholder(tf.float32, shape=[batch_size,input_size],name='dec_train_inputs_%d'%ui))\n",
    "    dec_train_labels.append(tf.placeholder(tf.float32, shape=[batch_size,vocabulary_size], name = 'dec_train_labels_%d'%ui))\n",
    "    dec_train_masks.append(tf.placeholder(tf.float32, shape=[batch_size,1],name='dec_train_masks_%d'%ui))\n",
    "\n",
    "enc_test_input = [tf.placeholder(tf.float32, shape=[batch_size,input_size]) for _ in range(enc_num_unrollings)]\n",
    "enc_test_mask = [tf.placeholder(tf.int32,shape=[batch_size]) for _ in range(enc_num_unrollings)] \n",
    "\n",
    "dec_test_input = tf.nn.embedding_lookup(tgt_word_embeddings,[tgt_dictionary['<s>']])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining the Encoder Model\n",
    "\n",
    "We define the encoder model. The encoder model is a single LSTM cell with TensorFlow variables for the state and output variables."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defining Encoder Parameters\n",
      "\tDone\n"
     ]
    }
   ],
   "source": [
    "print('Defining Encoder Parameters')\n",
    "with tf.variable_scope('Encoder'):\n",
    "    \n",
    "    # Input gate (i_t) - How much memory to write to cell state\n",
    "    enc_ix = tf.get_variable('ix',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_im = tf.get_variable('im',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_ib = tf.Variable(tf.random_uniform([1, num_nodes],-0.05, 0.05),name='ib')\n",
    "    \n",
    "    # Forget gate (f_t) - How much memory to discard from cell state\n",
    "    enc_fx = tf.get_variable('fx',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_fm = tf.get_variable('fm',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_fb = tf.Variable(tf.random_uniform([1, num_nodes],-0.05, 0.05),name='fb')\n",
    "    \n",
    "    # Candidate value (c~_t) - Used to compute the current cell state                    \n",
    "    enc_cx = tf.get_variable('cx',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_cm = tf.get_variable('cm',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_cb = tf.Variable(tf.random_uniform([1, num_nodes],-0.05,0.05),name='cb') \n",
    "    \n",
    "    # Output gate (o_t) - How much memory to output from the cell state\n",
    "    enc_ox = tf.get_variable('ox',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_om = tf.get_variable('om',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    enc_ob = tf.Variable(tf.random_uniform([1, num_nodes],-0.05,0.05),name='ob') \n",
    "    \n",
    "    # Variables saving state across unrollings.\n",
    "    saved_output = tf.Variable(tf.zeros([batch_size, num_nodes]), trainable=False, name='train_output')\n",
    "    saved_state = tf.Variable(tf.zeros([batch_size, num_nodes]), trainable=False, name = 'train_cell')\n",
    "    \n",
    "    # Variables for saving state for testing\n",
    "    saved_test_output = tf.Variable(tf.zeros([batch_size, num_nodes]),trainable=False, name='test_output')\n",
    "    saved_test_state = tf.Variable(tf.zeros([batch_size, num_nodes]),trainable=False, name='test_cell')\n",
    "\n",
    "print('\\tDone')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining the Decoder Model\n",
    "\n",
    "Decoder is a single LSTM cell with an additional softmax layer that can predict words."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defining Decoder Parameters\n",
      "\tDone\n"
     ]
    }
   ],
   "source": [
    "print('Defining Decoder Parameters')\n",
    "with tf.variable_scope('Decoder'):\n",
    "    \n",
    "    # Input gate (i_t) - How much memory to write to cell state\n",
    "    dec_ix = tf.get_variable('ix',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_im = tf.get_variable('im',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_ic = tf.get_variable('ic',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_ib = tf.Variable(tf.random_uniform([1, num_nodes],-0.05, 0.05),name='ib')    \n",
    "    \n",
    "    # Forget gate (f_t) - How much memory to discard from cell state\n",
    "    dec_fx = tf.get_variable('fx',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_fm = tf.get_variable('fm',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_fc = tf.get_variable('fc',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_fb = tf.Variable(tf.random_uniform([1, num_nodes],-0.05, 0.05),name='fb')    \n",
    "    \n",
    "    # Candidate value (c~_t) - Used to compute the current cell state                           \n",
    "    dec_cx = tf.get_variable('cx',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_cm = tf.get_variable('cm',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_cc = tf.get_variable('cc',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_cb = tf.Variable(tf.random_uniform([1, num_nodes],-0.05,0.05),name='cb')     \n",
    "    \n",
    "    # Output gate (o_t) - How much memory to output from the cell state\n",
    "    dec_ox = tf.get_variable('ox',shape=[input_size, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_om = tf.get_variable('om',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_oc = tf.get_variable('oc',shape=[num_nodes, num_nodes],\n",
    "                             initializer = tf.contrib.layers.xavier_initializer())\n",
    "    dec_ob = tf.Variable(tf.random_uniform([1, num_nodes],-0.05,0.05),name='ob') \n",
    "    \n",
    "    # Softmax Classifier weights and biases.\n",
    "    # If we are using sampled softmax loss, the weights dims shouldbe [50000, 64]\n",
    "    # If not, then [64, 50000]\n",
    "    w = tf.get_variable('softmax_weights',shape=[num_nodes*2, vocabulary_size], \n",
    "                        initializer = tf.contrib.layers.xavier_initializer())\n",
    "    b = tf.Variable(tf.random_uniform([vocabulary_size],-0.05,-0.05),name='softmax_bias')\n",
    "\n",
    "print('\\tDone')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Attention Layer Related Variables\n",
    "\n",
    "We define the weights used to compute the energy ($e_{ij}$) in the attention layer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defining Attention Variables ...\n",
      "\tDone\n"
     ]
    }
   ],
   "source": [
    "print('Defining Attention Variables ...')\n",
    "with tf.variable_scope('Attention'):\n",
    "    \n",
    "    # Used to calculate e_{ij} as\n",
    "    # e_{ij} = v_a' tanh(W_a . dec_output + U_a . enc_output)\n",
    "    # Then alpha_{ij} is the softmax output (normalized) of e_{ij}\n",
    "    W_a = tf.Variable(tf.truncated_normal([num_nodes,num_nodes],stddev=0.05),name='W_a')\n",
    "    U_a = tf.Variable(tf.truncated_normal([num_nodes,num_nodes],stddev=0.05),name='U_a')\n",
    "    v_a = tf.Variable(tf.truncated_normal([num_nodes,1],stddev=0.05),name='v_a')\n",
    "    \n",
    "print('\\tDone')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining Cell and Layer Computational Functions\n",
    "\n",
    "We define several functions below:\n",
    "* Encoder LSTM cell computations\n",
    "* Decoder LSTM cell computations\n",
    "* Attention layer computations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Definition of the cell computation (Encoder)\n",
    "def enc_lstm_cell(i, o, state):\n",
    "    \"\"\"Create a LSTM cell\"\"\"\n",
    "    input_gate = tf.sigmoid(tf.matmul(i, enc_ix) + tf.matmul(o, enc_im) + enc_ib)\n",
    "    forget_gate = tf.sigmoid(tf.matmul(i, enc_fx) + tf.matmul(o, enc_fm) + enc_fb)\n",
    "    update = tf.matmul(i, enc_cx) + tf.matmul(o, enc_cm) + enc_cb\n",
    "    state = forget_gate * state + input_gate * tf.tanh(update)\n",
    "    output_gate = tf.sigmoid(tf.matmul(i, enc_ox) + tf.matmul(o, enc_om) + enc_ob)\n",
    "    return output_gate * tf.tanh(state), state\n",
    "\n",
    "# Definition of the cell computation (Decoder)\n",
    "def dec_lstm_cell(i, o, state, c):\n",
    "    \"\"\"Create a LSTM cell\"\"\"\n",
    "    input_gate = tf.sigmoid(tf.matmul(i, dec_ix) + tf.matmul(o, dec_im) + tf.matmul(c, dec_ic) + dec_ib)\n",
    "    forget_gate = tf.sigmoid(tf.matmul(i, dec_fx) + tf.matmul(o, dec_fm) + tf.matmul(c, dec_fc) + dec_fb)\n",
    "    update = tf.matmul(i, dec_cx) + tf.matmul(o, dec_cm) + tf.matmul(c, dec_cc) +dec_cb \n",
    "    state = forget_gate * state + input_gate * tf.tanh(update)\n",
    "    output_gate = tf.sigmoid(tf.matmul(i, dec_ox) + tf.matmul(o, dec_om) + tf.matmul(o, dec_oc) + dec_ob)\n",
    "    return output_gate * tf.tanh(state), state\n",
    "                    \n",
    "def attn_layer(h_j_unrolled, s_i_minus_1):\n",
    "    '''\n",
    "    Computes attention values for a given decoding position\n",
    "    h_j_unrolled : all the unrolled encoder outputs [[batch_size, num_nodes], [batch_size, num_nodes], ....] => enc_num_unrolling-many\n",
    "    s_i_minus_1 : the previous decoder output [batch_size, num_nodes]\n",
    "    '''\n",
    "    # For the following four calculations we calculate by concatenating all encoder outputs (enc_num_unrollings)\n",
    "    # get the encoder logits\n",
    "    enc_logits = tf.concat(axis=0,values=h_j_unrolled)\n",
    "    \n",
    "    # W_a . encoder_output\n",
    "    w_a_mul_s_i_minus_1 = tf.matmul(enc_logits,W_a) # of size [enc_num_unroll x batch_size, num_nodes]\n",
    "    \n",
    "    # U_a . decoder_output\n",
    "    u_a_mul_h_j = tf.matmul(tf.tile(s_i_minus_1,[enc_num_unrollings,1]), U_a) # of size [enc_num_unroll x batch_size, num_nodes]   \n",
    "    \n",
    "    # calculate \"energy\"\n",
    "    e_j = tf.matmul(tf.nn.tanh(w_a_mul_s_i_minus_1 + u_a_mul_h_j),v_a) # of size [enc_num_unroll x batch_size ,1]\n",
    "    \n",
    "    # we split the e_j s again into enc_num_unrollings batches\n",
    "    batched_e_j = tf.split(axis=0,num_or_size_splits=enc_num_unrollings,value=e_j) # list of enc_num_unroll elements, each element [batch_size, 1]\n",
    "    reshaped_e_j = tf.concat(axis=1,values=batched_e_j) # of size [batch_size, enc_num_unroll]\n",
    "\n",
    "    # Now we calculate alpha_i for all the enc_num_unrollings time steps\n",
    "    alpha_i = tf.nn.softmax(reshaped_e_j) # of size [batch_size, enc_num_unroll]\n",
    "    # break alpha_i into list of enc_num_unroll elemtns, each of size [batch_size,1]\n",
    "    alpha_i_list = tf.unstack(alpha_i,axis=1) \n",
    "    \n",
    "    # list of enc_num_unroll elements, each of size [batch_size,num_nodes]\n",
    "    c_i_list =  [tf.reshape(alpha_i_list[e_i],[-1,1])*h_j_unrolled[e_i] for e_i in range(enc_num_unrollings)] \n",
    "    \n",
    "    # add_n batches all together\n",
    "    c_i = tf.add_n(c_i_list) # of size [batch_size, num_nodes]\n",
    "    \n",
    "    return c_i,alpha_i\n",
    "        "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining LSTM Computations\n",
    "\n",
    "Here we define the computations to compute the final state variables of the encoder, feeding that into the decoder as the intial state, computing attention and finally computing the LSTM output, logit values and the predictions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Calculating Encoder Output\n",
      "Calculating Decoder Output with Attention\n",
      "Calculating Softmax output\n",
      "Calculations for test data\n",
      "\tDone\n"
     ]
    }
   ],
   "source": [
    "# ================================================\n",
    "# Training related inference logic\n",
    "\n",
    "# Store encoder outputs and decoder outputs across the unrolling\n",
    "enc_outputs, dec_outputs = list(),list()\n",
    "\n",
    "# Context vecs are the c_i values in the attention computation\n",
    "context_vecs = list()\n",
    "\n",
    "# These variables are initialized with saved_output and saved_sate\n",
    "# values and then iteratively updated during unrollings\n",
    "output = saved_output\n",
    "state = saved_state\n",
    "                             \n",
    "\n",
    "print('Calculating Encoder Output')\n",
    "# update the output and state values for all the inputs we have\n",
    "for i in enc_train_inputs:\n",
    "    output, state = enc_lstm_cell(i, output,state)\n",
    "    # Accumulate all the output values in to a list\n",
    "    enc_outputs.append(output)\n",
    "\n",
    "print('Calculating Decoder Output with Attention')\n",
    "# Before starting decoder computations, we make sure that\n",
    "# the encoder outputs are computed\n",
    "with tf.control_dependencies([saved_output.assign(output),\n",
    "                             saved_state.assign(state)]):\n",
    "\n",
    "    # Iterate through the decoder unrollings\n",
    "    for ii,i in enumerate(dec_train_inputs):\n",
    "        \n",
    "        # Compute attention value for each decode position\n",
    "        c_i,_ = attn_layer(enc_outputs, output)\n",
    "        \n",
    "        # Accumulate c_i in a list\n",
    "        context_vecs.append(c_i)\n",
    "        \n",
    "        output, state = dec_lstm_cell(i, output, state, c_i)\n",
    "\n",
    "        # Accumulate decoder outputs in a list\n",
    "        dec_outputs.append(output)\n",
    "    \n",
    "    print('Calculating Softmax output')\n",
    "    \n",
    "    # Compute the logit values\n",
    "    logits = tf.matmul(\n",
    "        tf.concat(axis=1, values=[\n",
    "            tf.concat(axis=0, values=dec_outputs),\n",
    "            tf.concat(axis=0, values=context_vecs)\n",
    "        ]), w) + b\n",
    "\n",
    "    # Predictions.\n",
    "    train_prediction = tf.nn.softmax(logits)\n",
    "\n",
    "# ================================================\n",
    "# Testing related inference logic\n",
    "\n",
    "# Initialize iteratively updated states with \n",
    "# saved_test_output and saved_test_state\n",
    "test_output  = saved_test_output\n",
    "test_state = saved_test_state\n",
    "\n",
    "print(\"Calculations for test data\")\n",
    "test_predictions = []\n",
    "test_enc_outputs = []\n",
    "\n",
    "# Compute the encoder output iteratively\n",
    "for i in enc_test_input:\n",
    "    test_output, test_state = enc_lstm_cell(i, test_output,test_state)\n",
    "    test_enc_outputs.append(test_output)\n",
    "\n",
    "# This is used for visualization purposes\n",
    "# To build the attention matrix discussed in the chapter\n",
    "test_alpha_i_unrolled = []\n",
    "\n",
    "# Make sure the encoder computations are done\n",
    "with tf.control_dependencies([saved_test_output.assign(test_output),\n",
    "                                 saved_test_state.assign(test_state)]):\n",
    "    \n",
    "    # Compute the decoder outputs iteratively\n",
    "    for i in range(dec_num_unrollings):\n",
    "        \n",
    "        test_c_i,test_alpha = attn_layer(test_enc_outputs, test_output)\n",
    "        \n",
    "        # Used for attention visualization purposes\n",
    "        test_alpha_i_unrolled.append(test_alpha)\n",
    "        \n",
    "        test_output, test_state = dec_lstm_cell(dec_test_input, test_output, test_state, test_c_i)\n",
    "\n",
    "        # Compute predictions for each decoding step\n",
    "        test_prediction = tf.nn.softmax(\n",
    "            tf.nn.xw_plus_b(\n",
    "                tf.concat(axis=1,values=[test_output,test_c_i]), w, b\n",
    "            )\n",
    "        )\n",
    "\n",
    "        dec_test_input = tf.nn.embedding_lookup(tgt_word_embeddings,tf.argmax(test_prediction,axis=1))\n",
    "        test_predictions.append(tf.argmax(test_prediction,axis=1))\n",
    "\n",
    "print('\\tDone')            "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Calculating the Loss\n",
    "\n",
    "Here we calculate the loss. Loss is calculated by summing all the losses obtained across the time axis and averaging over the batch axis. You can see how the `dec_train_masks` is used to mask out irrelevant words from influencing loss"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Defining loss, cross-entropy loss summed across time axis averaged over batch axis\n",
    "loss_batch = tf.concat(axis=0,values=dec_train_masks)*tf.nn.softmax_cross_entropy_with_logits_v2(\n",
    "        logits=logits, labels=tf.concat(axis=0, values=dec_train_labels))\n",
    "loss = tf.reduce_mean(loss_batch)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Optimizer\n",
    "We define the model optimization specific operations. We use two optimizers here; Adam and SGD. I observed that using Adam only cause the model to exhibit some undesired behaviors in the long run. Therefore we use Adam to get a good initial estimate for the SGD and use SGD from that point onwards."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defining Optimizer\n",
      "Checking gradient flow from encoder-to-decoder\n",
      "\t Ok...\n",
      "\tDone\n"
     ]
    }
   ],
   "source": [
    "print('Defining Optimizer')\n",
    "\n",
    "# These are used to decay learning rate over time\n",
    "global_step = tf.Variable(0, trainable=False)\n",
    "inc_gstep = tf.assign(global_step,global_step + 1)\n",
    "\n",
    "# We use two optimizers, when the optimizer changes\n",
    "# we reset the global step\n",
    "reset_gstep = tf.assign(global_step,0)\n",
    "\n",
    "# Calculate decaying learning rate\n",
    "learning_rate = tf.maximum(\n",
    "    tf.train.exponential_decay(\n",
    "        0.005, global_step, decay_steps=1, decay_rate=0.95, staircase=True\n",
    "    ), 0.0001)\n",
    "\n",
    "sgd_learning_rate = tf.maximum(\n",
    "    tf.train.exponential_decay(\n",
    "        0.005, global_step, decay_steps=1, decay_rate=0.95, staircase=True\n",
    "    ), 0.0001)\n",
    "\n",
    "# We use two optimizers: Adam and naive SGD\n",
    "# using Adam in the long run produced undesirable results \n",
    "# (e.g.) sudden fluctuations in BLEU\n",
    "# Therefore we use Adam to get a good starting point for optimizing\n",
    "# and then switch to SGD from that point onwards\n",
    "with tf.variable_scope('Adam'):\n",
    "    optimizer = tf.train.AdamOptimizer(learning_rate)\n",
    "with tf.variable_scope('SGD'):\n",
    "    sgd_optimizer = tf.train.GradientDescentOptimizer(sgd_learning_rate)\n",
    "    \n",
    "# Calculates gradients with clipping for Adam\n",
    "gradients, v = zip(*optimizer.compute_gradients(loss))\n",
    "gradients, _ = tf.clip_by_global_norm(gradients, 25.0)\n",
    "optimize = optimizer.apply_gradients(zip(gradients, v))\n",
    "\n",
    "# Calculates gradients with clipping for SGD\n",
    "sgd_gradients, v = zip(*sgd_optimizer.compute_gradients(loss))\n",
    "sgd_gradients, _ = tf.clip_by_global_norm(sgd_gradients, 25.0)\n",
    "sgd_optimize = optimizer.apply_gradients(zip(sgd_gradients, v))\n",
    "\n",
    "# Make sure gradients exist flowing from decoder to encoder\n",
    "print('Checking gradient flow from encoder-to-decoder')\n",
    "for (g_i,v_i) in zip(gradients,v):\n",
    "    assert g_i is not None, 'Gradient none for %s'%(v_i.name)\n",
    "print('\\t Ok...')\n",
    "print('\\tDone')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Resetting Train and Test States\n",
    "We here define the state resetting functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Reset state\n",
    "reset_train_state = tf.group(\n",
    "    tf.assign(saved_output, tf.zeros([batch_size, num_nodes])),\n",
    "    tf.assign(saved_state, tf.zeros([batch_size, num_nodes]))\n",
    "                            )\n",
    "\n",
    "reset_test_state = tf.group(\n",
    "    saved_test_output.assign(tf.zeros([batch_size, num_nodes])),\n",
    "    saved_test_state.assign(tf.zeros([batch_size, num_nodes]))\n",
    "                             )\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " ## Running the Neural Machine Translator with Attention\n",
    " \n",
    " With all the relevant TensorFlow operations defined we move on to defining several functions related to executing our NMT model as well as runnning the model to obtain translations for previously unseen source sentences."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Functions for Evaulating and Printing Results\n",
    "\n",
    "Next we define two functions to print and save the prediction results for training data as well as testing data, and finally define a function to obtain candidate and reference data to calculate the BLEU score."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def print_and_save_train_predictions(du_labels, tr_pred, rand_idx, train_prediction_text_fname):\n",
    "    '''\n",
    "    Use this to print some predicted training samples and save it to file\n",
    "    du_labels: Decoder's unrolled labels (this is a list of dec_num_unrollings \n",
    "    where each item is [batch_size, vocabulary_size])\n",
    "    tr_pred: This is an array [dec_num_unrollings*batch_size, vocabulary_size] array\n",
    "    rand_idx: Some random index we use to pick a data point to print\n",
    "    train_prediction_text_fname: The file we save the prediction results into\n",
    "    '''\n",
    "\n",
    "    # This print_str will be written to the text file as well as printed here\n",
    "    print_str = 'Actual: ' \n",
    "    \n",
    "    # We can get each label corresponding to some sentence by traversing the\n",
    "    # concatenated labels array ([dec_num_unrollings*batch_size, vocabulary_size])\n",
    "    # with a batch_size stride\n",
    "    for w in np.argmax(np.concatenate(du_labels,axis=0)[rand_idx::batch_size],axis=1).tolist():\n",
    "        # Update the print_str\n",
    "        print_str += tgt_reverse_dictionary[w] + ' '\n",
    "        # When we encounter the end of sentence </s> we stop printing\n",
    "        if tgt_reverse_dictionary[w] == '</s>':\n",
    "            break\n",
    "    print(print_str)\n",
    "    \n",
    "    # Write to file\n",
    "    with open(os.path.join(log_dir, train_prediction_text_fname),'a',encoding='utf-8') as fa:                \n",
    "        fa.write(print_str+'\\n')  \n",
    "\n",
    "    # Now print the predicted data by following the same procedure as above\n",
    "    print()\n",
    "    print_str = 'Predicted: '\n",
    "    for w in np.argmax(tr_pred[rand_idx::batch_size],axis=1).tolist():\n",
    "        print_str += tgt_reverse_dictionary[w] + ' '\n",
    "        # When we encounter the end of sentence </s> we stop printing\n",
    "        if tgt_reverse_dictionary[w] == '</s>':\n",
    "            break\n",
    "    print(print_str)\n",
    "    with open(os.path.join(log_dir, train_prediction_text_fname),'a',encoding='utf-8') as fa:                \n",
    "        fa.write(print_str+'\\n')    \n",
    "    \n",
    "    \n",
    "def print_and_save_test_predictions(test_du_labels, test_pred_unrolled, batch_id, test_rand_idx, test_prediction_text_fname):\n",
    "    '''\n",
    "    Use this to print some predicted training samples and save it to file\n",
    "    test_du_labels: Decoder's unrolled labels (this is a list of dec_num_unrollings \n",
    "    where each item is [batch_size, vocabulary_size])\n",
    "    test_pred_unrolled: This is an array [dec_num_unrollings*batch_size, vocabulary_size] array\n",
    "    batch_id: We need this to retrieve the actual sentence for the predicted \n",
    "    test_rand_idx: Some random index we use to pick a data point to print\n",
    "    test_prediction_text_fname: The file we save the prediction results into\n",
    "    '''\n",
    "    \n",
    "    # Print the actual sentence\n",
    "    print('DE: ',test_source_sent[(batch_id*batch_size)+test_rand_idx])\n",
    "    # print_str is the string we display as results and write to a file\n",
    "    print_str = '\\t EN (TRUE):' + test_target_sent[(batch_id*batch_size)+test_rand_idx]\n",
    "    print(print_str + '\\n')\n",
    "\n",
    "    # Printing predictions\n",
    "    print_str = '\\t EN (Predicted): ' \n",
    "    \n",
    "    for test_pred in test_pred_unrolled:                            \n",
    "        print_str += tgt_reverse_dictionary[test_pred[test_rand_idx]] + ' '\n",
    "        if tgt_reverse_dictionary[test_pred[test_rand_idx]] == '</s>':\n",
    "            break\n",
    "    print(print_str + '\\n')\n",
    "\n",
    "    # Write the results to text file\n",
    "    with open(os.path.join(log_dir, test_prediction_text_fname),'a',encoding='utf-8') as fa:                                \n",
    "        fa.write(print_str+'\\n') \n",
    "        \n",
    "def create_bleu_ref_candidate_lists(all_preds, all_labels):\n",
    "    '''\n",
    "    Creates two lists (candidate list and reference list) for calcluating BLEU\n",
    "    all_preds: All the predictions\n",
    "    all_labels: Correspondign all the actual labels\n",
    "    Returns\n",
    "    cand_list: List (sentences) of lists (words in a sentence)\n",
    "    ref_list: List (sentences) of lists (words in a sentence)\n",
    "    '''\n",
    "    bleu_labels, bleu_preds = [],[]\n",
    "    \n",
    "    # calculate bleu score:        \n",
    "    # We iterate batch_size times as i=0,1,2,...,batch_size while grabbing \n",
    "    # i, i+batch_size, i+2*batch_size, i+3*batch_size elements from all_labels and all_preds\n",
    "    # This because the labels/predicitons belonging to same sentence are interleaved by batch_size \n",
    "    # due to the way concatenate labels and predictions\n",
    "    # Taking elements interleaved by batch_size gives the sequence of words belonging to the same sentence\n",
    "    ref_list, cand_list = [],[]\n",
    "    for b_i in range(batch_size):\n",
    "        tmp_lbl = all_labels[b_i::batch_size]            \n",
    "        tmp_lbl = tmp_lbl[np.where(tmp_lbl != tgt_dictionary['</s>'])]            \n",
    "        ref_str = ' '.join([tgt_reverse_dictionary[lbl] for lbl in tmp_lbl])\n",
    "        ref_list.append([ref_str])\n",
    "\n",
    "        tmp_pred = all_preds[b_i::batch_size]\n",
    "        tmp_pred = tmp_pred[np.where(tmp_pred != tgt_dictionary['</s>'])]\n",
    "        cand_str = ' '.join([tgt_reverse_dictionary[pre] for pre in tmp_pred])\n",
    "        cand_list.append(cand_str)\n",
    "\n",
    "    return cand_list, ref_list"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining a Single Step of Training\n",
    "\n",
    "We now define a function to train the NMT model for a single step. It takes in encoder inputs, decoder inputs and decoder labels and train the NMT for a single step."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def train_single_step(eu_data, du_data, du_labels):\n",
    "    '''\n",
    "    Define a single training step\n",
    "    eu_data: Unrolled encoder inputs (word embeddings)\n",
    "    du_data: Unrolled decoder inputs (word embeddings)\n",
    "    du_labels: Unrolled decoder outputs (one hot encoded words)\n",
    "    '''\n",
    "    # Fill the feed dict (Encoder)\n",
    "    feed_dict = {}\n",
    "    for ui,dat in enumerate(eu_data):            \n",
    "        feed_dict[enc_train_inputs[ui]] = dat    \n",
    "    \n",
    "    \n",
    "    # Fill the feed dict (Decoder) \n",
    "    for ui,(dat,lbl) in enumerate(zip(du_data,du_labels)):            \n",
    "        feed_dict[dec_train_inputs[ui]] = dat\n",
    "        feed_dict[dec_train_labels[ui]] = lbl\n",
    "        # The mask masks the </s> items from being part of the loss\n",
    "        d_msk = (np.logical_not(np.argmax(lbl,axis=1)==tgt_dictionary['</s>'])).astype(np.int32).reshape(-1,1)\n",
    "        feed_dict[dec_train_masks[ui]] = d_msk\n",
    "    \n",
    "    # ======================= OPTIMIZATION ==========================\n",
    "    # Using Adam in long term gives very weird behaviors in loss\n",
    "    # so after 20000 iterations we change the optimizer to SGD\n",
    "    if (step+1)<20000:\n",
    "        _,l,tr_pred = sess.run([optimize,loss,train_prediction], feed_dict=feed_dict)\n",
    "    else:\n",
    "        _,l,tr_pred = sess.run([sgd_optimize,loss,train_prediction], feed_dict=feed_dict)\n",
    "        \n",
    "    return l, tr_pred"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Defining Data Generators and Other Related Variables\n",
    "\n",
    "Here we load the word embeddings and some other things as well as define a function to retrieve data generators"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# This is where all the results will be logged into\n",
    "log_dir = 'logs'\n",
    "if not os.path.exists(log_dir):\n",
    "    os.mkdir(log_dir)\n",
    "\n",
    "# Filenames of the logs\n",
    "train_prediction_text_fname = 'train_predictions_attn.txt'\n",
    "test_prediction_text_fname = 'test_predictions_attn.txt'\n",
    "\n",
    "# Some configuration for the TensorFlow session\n",
    "config = tf.ConfigProto()\n",
    "config.gpu_options.allow_growth = True\n",
    "config.allow_soft_placement=True\n",
    "sess = tf.InteractiveSession(config=config)\n",
    "\n",
    "# Initialize global variables\n",
    "tf.global_variables_initializer().run()\n",
    "\n",
    "# Load the word embeddings\n",
    "src_word_embeddings = np.load('de-embeddings.npy')\n",
    "tgt_word_embeddings = np.load('en-embeddings.npy')\n",
    "\n",
    "# Defining data generators\n",
    "def define_data_generators(batch_size, enc_num_unrollings, dec_num_unrollings):\n",
    "    # Training data generators (Encoder and Decoder)\n",
    "    enc_data_generator = DataGeneratorMT(batch_size=batch_size,num_unroll=enc_num_unrollings,is_source=True, is_train=True)\n",
    "    dec_data_generator = DataGeneratorMT(batch_size=batch_size,num_unroll=dec_num_unrollings,is_source=False, is_train=True)\n",
    "\n",
    "    # Testing data generators (Encoder and Decoder)\n",
    "    test_enc_data_generator = DataGeneratorMT(batch_size=batch_size,num_unroll=enc_num_unrollings,is_source=True, is_train=False)\n",
    "    test_dec_data_generator = DataGeneratorMT(batch_size=batch_size,num_unroll=dec_num_unrollings,is_source=False, is_train=False)\n",
    "    \n",
    "    return enc_data_generator,dec_data_generator,test_enc_data_generator,test_dec_data_generator\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running Training and Testing for NMT\n",
    "\n",
    "With all the TensorFlow operations, helper functions defined we train and test the NMT system."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Started Training\n",
      "..................................................Step  500\n",
      "Actual: You can reserve your treatment at the spa from Tuesday to Saturday 11 : 00 to 19 : 30 . </s> \n",
      "\n",
      "Predicted: The is the the the , the <unk> of the . the . . <unk> . the . <unk> . </s> \n",
      "(Train) BLEU (530 elements):  0.08305565521562465\n",
      "..................................................Step  1000\n",
      "Actual: The southern half is the section where <unk> and great gurus live . </s> \n",
      "\n",
      "Predicted: The hotel is of a <unk> of the , the . ##AT##-##AT## . </s> \n",
      "(Train) BLEU (400 elements):  0.1793990845295268\n",
      "============= Step  1000  =============\n",
      "\t Loss:  1.1863172934949398\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the heart of the city of the city . </s> \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city , and the hotel is situated in the city of the city . </s> \n",
      "\n",
      "DE:  Es existieren Busverbindungen in nahezu jeden Ort der Provence ( eventuell mit Umsteigen in Aix ##AT##-##AT## en ##AT##-##AT## Provence ) , allerdings sollte beachtet werden , dass die letzten Busse abends ca. um 19 Uhr fahren .\n",
      "\n",
      "\t EN (TRUE):As always in France those highways are expensive but practical , comfortable and fast .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the heart of the heart of the city , and the hotel is situated in the heart of the city , and the <unk> , <unk> , and the <unk> , <unk> , and the <unk> , <unk> , and the <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city of the city . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city , and the hotel is situated in the city of the city . </s> \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city . </s> \n",
      "\n",
      "DE:  Kosten Sie mediterrane Gerichte im preisgekrönten Restaurant Molyvos .\n",
      "\n",
      "\t EN (TRUE):Enjoy award winning Mediterranean cuisine at Molyvos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at the <unk> . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the \n",
      "\n",
      "DE:  Es gibt in der Nähe kein Stadtzentrum , in dem man abends beruhigt spazieren gehen könnte . Zu Fuß braucht man in das Zentrum Bournemouths 25 min .\n",
      "\n",
      "\t EN (TRUE):Also , the possibility of a small corner play area for kids in restuarant so that adults can eat in peace and with peace of mind .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city , and the hotel is situated in the city of the city . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.16365833935086183\n",
      "=====================================================\n",
      "..................................................Step  1500\n",
      "Actual: In addition to the listed facilities , the hotel offers also 5 meeting rooms with a maximum capacity for 120 people . </s> \n",
      "\n",
      "Predicted: The addition to the city <unk> , the hotel is a a minutes and . a short of of the . . </s> \n",
      "(Train) BLEU (410 elements):  0.23987417808993816\n",
      "..................................................Step  2000\n",
      "Actual: <unk> , 4 Days , from <unk> to <unk> , no frills , no trace camping , no camps provided , sleep in your own tent out in the park with the wildlife . </s> \n",
      "\n",
      "Predicted: We is the ##AT##-##AT## of the the , the , the is , the <unk> , the the <unk> , the the , the room . . of the world . the best and </s> \n",
      "(Train) BLEU (570 elements):  0.25380600529843683\n",
      "============= Step  2000  =============\n",
      "\t Loss:  1.0047732735276222\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located in the heart of the hotel , the hotel is located in the heart of the hotel . </s> \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located in the heart of the hotel , the hotel is located in the heart of the city , and the hotel is a perfect location for the hotel . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a very location . </s> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is a <unk> of the <unk> , the <unk> of the <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located in the heart of the hotel , the hotel is located in the heart of the hotel . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All children under the total of our stay at Hotel <unk> Hotel <unk> Hotel <unk> , <unk> Hotel <unk> . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> , the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is very friendly and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.15094664841209596\n",
      "=====================================================\n",
      "..................................................Step  2500\n",
      "Actual: Location is good for sightseeing and room <unk> is also good and comfortable . </s> \n",
      "\n",
      "Predicted: The is a and a and <unk> . . a available . the . </s> \n",
      "(Train) BLEU (490 elements):  0.2886436122324411\n",
      "..................................................Step  3000\n",
      "Actual: If you check any boxes , only those data types will be synchronized . Then , click Add Member . </s> \n",
      "\n",
      "Predicted: The you can ##AT##-##AT## new , you a of , of be used . </s> \n",
      "(Train) BLEU (600 elements):  0.28100615137747403\n",
      "============= Step  3000  =============\n",
      "\t Loss:  0.9379537771344185\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): I have a little more to be a <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a very good location to the <unk> . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible on site and costs EUR 17 <unk> per day . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Nach einigen Wanderwochen erreichten ich und Celina Warschau . Auf dem Weg zum jüdischen Komitee begegnete ich auf der Straße meinem Bruder !\n",
      "\n",
      "\t EN (TRUE):It turned out that Marek had jumped from the window of a train moving to Majdanek .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is a very good place to the <unk> . </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Very friendly and helpful . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a small machine . </s> \n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "\t EN (TRUE):Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel <unk> offers a perfect base to the hotel . </s> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): NI ##AT##-##AT## <unk> , NI ##AT##-##AT## <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> is a small <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.17405784152394474\n",
      "=====================================================\n",
      "..................................................Step  3500\n",
      "Actual: As a source of inspiration for the whole of industry , the Augsburg ##AT##-##AT## based company shows that there are no ideas that cannot be implemented . </s> \n",
      "\n",
      "Predicted: The the result of the , the future , the , the <unk> , <unk> ##AT##-##AT## , the the are a longer , are be able in </s> \n",
      "(Train) BLEU (480 elements):  0.2771487138682491\n",
      "..................................................Step  4000\n",
      "Actual: With your reservation you can take out <unk> holiday insurance to cover you for cancellation and other unforeseen <unk> . </s> \n",
      "\n",
      "Predicted: You a own <unk> can find a of and in . the the to your . the information . . </s> \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Train) BLEU (410 elements):  0.29593363042257675\n",
      "============= Step  4000  =============\n",
      "\t Loss:  0.9000037522614002\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 And it came to pass that they are a <unk> , and I have a b b and the b of the Lord . </s> \n",
      "\n",
      "DE:  Alle unterstützten Barcode Varianten sind in einem einzigen Interface konfigurierbar .\n",
      "\n",
      "\t EN (TRUE):All supported bar code formats are configurable through one single interface .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All can be used to the <unk> . </s> \n",
      "\n",
      "DE:  Es existieren Busverbindungen in nahezu jeden Ort der Provence ( eventuell mit Umsteigen in Aix ##AT##-##AT## en ##AT##-##AT## Provence ) , allerdings sollte beachtet werden , dass die letzten Busse abends ca. um 19 Uhr fahren .\n",
      "\n",
      "\t EN (TRUE):As always in France those highways are expensive but practical , comfortable and fast .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a few minutes from the <unk> ( <unk> ) , and the <unk> ( <unk> ) , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): I had a little noisy . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> of <unk> <unk> is a small <unk> , and the <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> <unk> is a <unk> ##AT##-##AT## <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged NOK <unk> <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.14619217788747896\n",
      "=====================================================\n",
      "..................................................Step  4500\n",
      "Actual: <unk> uses the Footprint calculator to analyze their operation systems and determine how to lower their Footprint and increase their operations efficiency ( and reduce costs , especially in waste transport ) . </s> \n",
      "\n",
      "Predicted: The , the most <unk> to the , products , , the to to the ##AT##-##AT## own <unk> the your products . . including the the ) ) in the ) ) . </s> \n",
      "(Train) BLEU (520 elements):  0.30768226027960593\n",
      "..................................................Step  5000\n",
      "Actual: Vodice is one of biggest tourist centers on Middle Adriatic with realization over 50 000 tourist accommodations in Hotels and in private accommodations family pensions , apartments and rooms . It is situated on the sunny coast of the Middle Adriatic , the area of bright sea . </s> \n",
      "\n",
      "Predicted: The <unk> the of the destinations destinations , the Europe , the of the years , , in the . the the areas . . . and and the are </s> \n",
      "(Train) BLEU (490 elements):  0.305359720659197\n",
      "============= Step  5000  =============\n",
      "\t Loss:  0.882687188565731\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 13 And the Lord shall be a b b b God , and the b Spirit of God , and they shall be b b . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great location , the hotel offers a comfortable and comfortable atmosphere of the hotel ’ s most important attractions and the surrounding beaches of the city , and the <unk> <unk> <unk> is the perfect place to enjoy the <unk> . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible on site and costs EUR 6 <unk> per day . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> , the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> is a <unk> ##AT##-##AT## <unk> , which is a <unk> ##AT##-##AT## <unk> , which is a high ##AT##-##AT## speed ##AT##-##AT## based ##AT##-##AT## based ##AT##-##AT## based applications . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : <unk> <unk> , <unk> , <unk> , France , France - 13 Guest reviews . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): O <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> ) . </s> \n",
      "\n",
      "DE:  Das ist eine Metapher , wird jemand von der Propagandaabteilung entgegnen .\n",
      "\n",
      "\t EN (TRUE):It &apos;s only a metaphor , people from the propaganda department will say .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The is a &quot; <unk> &quot; &quot; . </s> \n",
      "\n",
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a great location , but you can find a <unk> , but it is a great place to be a great way to be a <unk> . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can find a wide selection of a great location , and the <unk> , the <unk> , the <unk> and <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.18749575518933467\n",
      "=====================================================\n",
      "..................................................Step  5500\n",
      "Actual: great location , excellent staff , good value for money , the room design shows attention for details ; the hotel is warm and cosy . </s> \n",
      "\n",
      "Predicted: The breakfast , the breakfast , the value for money . and room was and the to the . and hotel is not . friendly . </s> \n",
      "(Train) BLEU (430 elements):  0.33016229043527745\n",
      "..................................................Step  6000\n",
      "Actual: Returns the sum of values as an integer or float . </s> \n",
      "\n",
      "Predicted: The the <unk> of the of well array or <unk> . </s> \n",
      "(Train) BLEU (550 elements):  0.31676699377316403\n",
      "============= Step  6000  =============\n",
      "\t Loss:  0.8611091077029706\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): We have a great choice of the <unk> , and the <unk> <unk> <unk> , the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a very quiet and quiet location in the heart of the city , the hotel is located in the heart of the city . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> is a great place to stay in the city . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Conil in Costa del Sol , Spain . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Picard , the <unk> , the <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> ##AT##-##AT## \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Zerstören Sie alle Blöcke , um zur nächsten Ebene zu gelangen .\n",
      "\n",
      "\t EN (TRUE):Destroy all the blocks to advance to the next level .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You can see the hotel to get the <unk> . </s> \n",
      "\n",
      "DE:  With a unique location in the heart of Peneda / Gerês National Park , this Pousada has a breathking view over the river Cávado and the peaceful Caniçada dam .\n",
      "\n",
      "\t EN (TRUE):Located in the heart of Peneda ##AT##-##AT## Gerês National Park , this guest house boasts panoramic views of the surrounding mountains and is a welcome retreat for nature enthusiasts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 4 ##AT##-##AT## star hotel is located in the heart of the city , just a short walk from the <unk> motorway . </s> \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is a <unk> ##AT##-##AT## <unk> , which is a <unk> ##AT##-##AT## <unk> , which is a <unk> ##AT##-##AT## <unk> . </s> \n",
      "\n",
      "DE:  William Gross beschreibt die Bedeutung des Manuskripts für die Sammlung der Familie Gross .\n",
      "\n",
      "\t EN (TRUE):William Gross describes the significance of the manuscript to the Gross Family Collection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the first ##AT##-##AT## class of the <unk> is the most important for the future of the <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.21535799005893752\n",
      "=====================================================\n",
      "..................................................Step  6500\n",
      "Actual: While most companies have already automated their business processes and document workflow procedures , they had to leave the approval stage as the only component that still requires the use of a paper . Many mobile operators realize that whenever paper is involved , a large amount of time and money is wasted and security risks increase . </s> \n",
      "\n",
      "Predicted: <unk> the of , been been a <unk> , , the <unk> , , and have to the the <unk> of . the <unk> <unk> of the the the <unk> of the <unk> . </s> \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Train) BLEU (520 elements):  0.32406730404646117\n",
      "..................................................Step  7000\n",
      "Actual: Room Notes : Advance <unk> Rate – Bed and Breakfast . </s> \n",
      "\n",
      "Predicted: Room Notes : <unk> <unk> <unk> - <unk> &amp; Breakfast . </s> \n",
      "(Train) BLEU (560 elements):  0.3168551081419188\n",
      "============= Step  7000  =============\n",
      "\t Loss:  0.8473638187050819\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): In the hotel , you can enjoy a drink with a drink , and enjoy a great choice of the hotel . </s> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel is located in the centre of the city , and the main railway station . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): breakfast was very nice and the hotel was very clean and the staff were very friendly and helpful . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> is a very popular way to a <unk> , which is a very popular way to a <unk> . </s> \n",
      "\n",
      "DE:  Karibische Küche gut . Kaum bekannt - bis jetzt !\n",
      "\n",
      "\t EN (TRUE):Can get quite dodgy at night .\n",
      "\n",
      "\n",
      "\t EN (Predicted): - I would like to stay at the hotel . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): O / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / <unk> / \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a great place to enjoy the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): NI Suite Suite , <unk> , NI ##AT##-##AT## <unk> , NI ##AT##-##AT## <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): PHP can be used to be used . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.20610166625440182\n",
      "=====================================================\n",
      "..................................................Step  7500\n",
      "Actual: The complex is in a unique place with wonderful sights . </s> \n",
      "\n",
      "Predicted: The hotel is located a quiet , in a views of </s> \n",
      "(Train) BLEU (510 elements):  0.3347640539226757\n",
      "..................................................Step  8000\n",
      "Actual: Nestled in a meander of the River Seine , this hotel is well located in the heart of Rouen , in northwestern France . </s> \n",
      "\n",
      "Predicted: Set in the quiet ##AT##-##AT## the city <unk> , this is is located located in the heart of the ##AT##-##AT## the the , . </s> \n",
      "(Train) BLEU (470 elements):  0.3450378165986993\n",
      "============= Step  8000  =============\n",
      "\t Loss:  0.8339813574254513\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This is the <unk> ® ® , which allows you to be able to be used for the <unk> ® ® ® , and can be used for the <unk> ® ® ® . </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 3 And if you are a a b , that they might be b , for the b , and the Lord , who , that the b <unk> is not a <unk> , and that the things are not a <unk> , and that the things are not a <unk> , and that the things are not to be \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> <unk> , <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If you are using the default server . </s> \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Enjoy the right right in the heart of the city , the hotel is located in the heart of the city , in the heart of the city . </s> \n",
      "\n",
      "DE:  Wann möchten Sie im Leon &apos; s Place Hotel In Rome übernachten ?\n",
      "\n",
      "\t EN (TRUE):When would you like to stay at the Leon &apos;s Place Hotel In Rome ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): When would you like to stay at the Grand Hotel <unk> Hotel ? </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): But if it is a little more than the first time , but the <unk> is the same time . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das ist eine Metapher , wird jemand von der Propagandaabteilung entgegnen .\n",
      "\n",
      "\t EN (TRUE):It &apos;s only a metaphor , people from the propaganda department will say .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is a <unk> of <unk> . </s> \n",
      "\n",
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): It is also possible to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22113517061211246\n",
      "=====================================================\n",
      "..................................................Step  8500\n",
      "Actual: Nova <unk> is developing a complete range of services and sporting installations , shopping centres , health , education and recreational centres that will create a small city that has everything that is necessary . </s> \n",
      "\n",
      "Predicted: <unk> <unk> is a a wide and of services and services events for including and and and and and and entertainment , and are be a variety variety and is been to you a to </s> \n",
      "(Train) BLEU (450 elements):  0.3178027082978835\n",
      "..................................................Step  9000\n",
      "Actual: This 22 year old developer runs a one man IT department for Creative Communications . </s> \n",
      "\n",
      "Predicted: This new years was years is on total of for . . a . . </s> \n",
      "(Train) BLEU (370 elements):  0.3171507547942616\n",
      "============= Step  9000  =============\n",
      "\t Loss:  0.8268479873090983\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we have to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Hotel <unk> is located in the heart of the city of <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Our apartments are located in the centre of <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 15 % of the date of the <unk> . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> &quot; is a very important role in the world . </s> \n",
      "\n",
      "DE:  Die Deutschen sind schließlich nicht mehr dieselben , und Greuel gab es auf beiden Seiten dieser Front ; vergessen wir alle diejenigen , die die Orden und Medaillen des 9. Mai tragen - es sind doch so viele Jahre vergangen .\n",
      "\n",
      "\t EN (TRUE):Afterall &#91; they say &#93; , the Germans are no longer the same , and there was cruelty on both sides of the front ; let &apos;s forget all those who wear the medals of 9 May – so many years have passed since .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we have to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR per <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can use the <unk> ##AT##-##AT## <unk> , in the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): I am not in the room . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.206885407958781\n",
      "=====================================================\n",
      "..................................................Step  9500\n",
      "Actual: HC 1 : 37 – 38 . Oliver is <unk> to be patient , and is urged to be content to write , for the time being , at the dictation of the translator , rather than to attempt to translate . </s> \n",
      "\n",
      "Predicted: The , <unk> The , and , </s> \n",
      "(Train) BLEU (400 elements):  0.3418615594850738\n",
      "..................................................Step  10000\n",
      "Actual: Enjoy warm hospitality and friendly service in the heart of the city , with a complimentary buffet breakfast , an internet corner and free sauna . The parking garage is in the direct vicinity of the hotel . </s> \n",
      "\n",
      "Predicted: The the hospitality and a atmosphere , the heart of the city , the a complimentary buffet breakfast , a excellent service , a Wi . </s> \n",
      "(Train) BLEU (490 elements):  0.32954102218577125\n",
      "============= Step  10000  =============\n",
      "\t Loss:  0.8275505687445402\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Hotel <unk> is a very central location , a short walk from the city centre and the main railway station . </s> \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 17 And behold , behold , they shall be b merciful , and shall not be b , and shall be b , and the b <unk> , and the b <unk> , and their children shall be <unk> . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Our apartments are located in the <unk> <unk> <unk> , the hotel is located in the heart of the city . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): breakfast was very nice . </s> \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Enjoy the sea view to the sea , the sea and the sea . </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western <unk> , <unk> , France - <unk> Guest reviews . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a number of the <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR for <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): &quot; The &quot; <unk> &quot; , &quot; <unk> &quot; , &quot; <unk> &quot; , &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; <unk> &quot; , the &quot; \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.20668483136184723\n",
      "=====================================================\n",
      "..................................................Step  10500\n",
      "Actual: The Ski Station of <unk> ##AT##-##AT## Los Lagos is located in <unk> , in the Valley of Tena in the province of Huesca , in the heart of the <unk> . </s> \n",
      "\n",
      "Predicted: The <unk> <unk> <unk> <unk> is <unk> is is located in the , in the heart <unk> <unk> , the province of the . near the heart of the <unk> . </s> \n",
      "(Train) BLEU (450 elements):  0.32833163256253317\n",
      "..................................................Step  11000\n",
      "Actual: If its inhabitants have become fluid , working part time in Spain or Greece and part time at home , if they are half ##AT##-##AT## way between village and city , between capitalism and state socialism , then what else could one expect than a fluid city ? </s> \n",
      "\n",
      "Predicted: If you own is been a , and in of , the , the , <unk> of , the , and you are not of of , the and <unk> , and the , <unk> ##AT##-##AT## . and , is do be of . the few of . </s> \n",
      "(Train) BLEU (410 elements):  0.34675300703919654\n",
      "============= Step  11000  =============\n",
      "\t Loss:  0.8160607063621282\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> , you will be able to be a <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  In raschem Tempo werden die Modelle angepasst und erneuert .\n",
      "\n",
      "\t EN (TRUE):The models are quickly being improved and renewed .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> will be used to the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): I am not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If the data is not installed . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can download the <unk> on the <unk> ! </s> \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at <unk> <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "\t EN (TRUE):Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a perfect place for exploring the city . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : The luxury rooms are decorated with a high standard of the hotel ’ s throw away , and the <unk> of the hotel is a modern and modern hotel . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> and <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22858280432407194\n",
      "=====================================================\n",
      "..................................................Step  11500\n",
      "Actual: Is one a citizen of three states , or is one a minority ? </s> \n",
      "\n",
      "Predicted: Is a of few of the months of or the a of <unk> of </s> \n",
      "(Train) BLEU (370 elements):  0.3418817583132596\n",
      "..................................................Step  12000\n",
      "Actual: Congratulations and thank you very much , we will continue searching especially on prices , because in view of what is seen throughout <unk> expensive , so the first and most importantly be informed of the price of flights and accommodation to predict numbers drop . </s> \n",
      "\n",
      "Predicted: We , the you to important , but are be to for for the , and they the , the you that in the , , and that people time the of , in that the <unk> of the , the , the the of in </s> \n",
      "(Train) BLEU (410 elements):  0.35277939127044716\n",
      "============= Step  12000  =============\n",
      "\t Loss:  0.7992919929921627\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hotel <unk> is a great base for exploring the city centre , the hotel is located in the centre of the city centre , the hotel is located in the heart of the city centre . </s> \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 And behold , behold , and the a <unk> , and the b of the earth , and the b of the earth , and the b of the earth , and they shall be <unk> , and they shall be <unk> , and they are not a great , and they shall be <unk> . </s> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good and the staff were very helpful . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If you have installed the data of the server , which is used to be used . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> Hotel and <unk> . </s> \n",
      "\n",
      "DE:  Naturreservat auf aufgeschüttetem Gelände am Río de la Plata .\n",
      "\n",
      "\t EN (TRUE):Wide selection of main courses including fresh pasta in homemade sauces ( $ 15 ##AT##-##AT## 30AR ) , traditional chicken dishes incuding Chicken Marsala ( $ 20AR- $ 30AR ) , and a variety of meats including Argentine parilla style steaks ( $ 35AR ) . The menu of seafood is worth considering with rareties such as fresh Yellow ##AT##-##AT## fin Tuna steak in a pesto sauce ( $ 30AR ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel is located on the <unk> de la Luz . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our Premium Executive Room is located in the <unk> <unk> , with a double bed and a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a large bedroom , a \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can get a new version of the latest games , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.2523678229731235\n",
      "=====================================================\n",
      "..................................................Step  12500\n",
      "Actual: The last ten years <unk> became desirable quiet place for holidays . </s> \n",
      "\n",
      "Predicted: The 2 ##AT##-##AT## of ago <unk> a , and in the . </s> \n",
      "(Train) BLEU (420 elements):  0.34947250587745593\n",
      "..................................................Step  13000\n",
      "Actual: 124 <unk> to be a idle ; cease to be b unclean ; cease to c find fault one with another ; cease to d sleep longer than is <unk> ; retire to thy bed early , that ye may not be weary ; arise early , that your bodies and your minds may be e <unk> . </s> \n",
      "\n",
      "Predicted: <unk> , , be a <unk> , and to be a , , yea to be <unk> , , of a a yea to be <unk> , , a not . for , be <unk> . . and they may be be able . for , . and they c is the <unk> . be b . . </s> \n",
      "(Train) BLEU (420 elements):  0.3421802868491514\n",
      "============= Step  13000  =============\n",
      "\t Loss:  0.7911088198721409\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a perfect base for a relaxing holiday . </s> \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 Behold , he shall not be able to be b , and the b <unk> of the land , and the b <unk> , and the b <unk> of the earth , and they have been b <unk> , and they shall not be able to be <unk> . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): These apartments are equipped with a private bathroom , a small balcony , a private bathroom , a private bathroom . </s> \n",
      "\n",
      "DE:  Im Allgemeinen basieren sie auf Datenbanken , Templates und Skripts .\n",
      "\n",
      "\t EN (TRUE):In general they are based on databases , template and scripts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , they are able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The two ##AT##-##AT## dimensional ##AT##-##AT## three ##AT##-##AT## year ##AT##-##AT## year ##AT##-##AT## year ##AT##-##AT## <unk> is a <unk> of the <unk> of the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a small and a lot of the best of the best <unk> in the <unk> . </s> \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Beret <unk> , many of the <unk> , the <unk> and <unk> of the <unk> , the <unk> and <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Royal Hotel is only 100 metres from the <unk> Museum . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : All of the spacious rooms are located in the <unk> area , with a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , a private bathroom , \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23279519520803796\n",
      "=====================================================\n",
      "..................................................Step  13500\n",
      "Actual: He was general counsel and professor of business at Northeast Missouri State University in <unk> ( now Truman State University ) from 1973 until his retirement in 1995 , and also held the post of dean of administration for five years . </s> \n",
      "\n",
      "Predicted: He was a in in the of the and the <unk> , ( ( the , <unk> ) ) ) ) , the and the <unk> , the , the the the in <unk> of the <unk> the and the years of </s> \n",
      "(Train) BLEU (480 elements):  0.35556376767254444\n",
      "..................................................Step  14000\n",
      "Actual: The main focus of work lies on further documentation , drawing and <unk> analysis of the areas and buildings that were excavated a considerable time ago , and on their comprehensive study in their urban and regional context . </s> \n",
      "\n",
      "Predicted: The <unk> <unk> on the and on the and of and and <unk> , and the <unk> of the of are the and <unk> <unk> of , and the the behalf market and the own context social . . </s> \n",
      "(Train) BLEU (510 elements):  0.36032260140033634\n",
      "============= Step  14000  =============\n",
      "\t Loss:  0.7845184849053621\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a great base for a relaxing and relaxing stay . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great place to relax and enjoy a wonderful view of the <unk> Valley , the <unk> <unk> and the <unk> Valley and the <unk> <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> for the <unk> , the <unk> , the <unk> and the <unk> , the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): I would like to stay the <unk> . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The “ <unk> ” is a more than more than more than a matter of a <unk> . </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western Hotel <unk> , <unk> , Austria - 14 Guest reviews . </s> \n",
      "\n",
      "DE:  Naturreservat auf aufgeschüttetem Gelände am Río de la Plata .\n",
      "\n",
      "\t EN (TRUE):Wide selection of main courses including fresh pasta in homemade sauces ( $ 15 ##AT##-##AT## 30AR ) , traditional chicken dishes incuding Chicken Marsala ( $ 20AR- $ 30AR ) , and a variety of meats including Argentine parilla style steaks ( $ 35AR ) . The menu of seafood is worth considering with rareties such as fresh Yellow ##AT##-##AT## fin Tuna steak in a pesto sauce ( $ 30AR ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel is located in the heart of the capital . </s> \n",
      "\n",
      "DE:  With a unique location in the heart of Peneda / Gerês National Park , this Pousada has a breathking view over the river Cávado and the peaceful Caniçada dam .\n",
      "\n",
      "\t EN (TRUE):Located in the heart of Peneda ##AT##-##AT## Gerês National Park , this guest house boasts panoramic views of the surrounding mountains and is a welcome retreat for nature enthusiasts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Jeder Wikitraveler kann Artikel verändern , neue Seiten erstellen und sogar Informationen über die Seite selbst überschreiben .\n",
      "\n",
      "\t EN (TRUE):Any Wikitraveller can change articles , rewrite navigation areas , even overwrite information about the site itself .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a new list to get a new page to get more information about the information . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): When you are looking for a new page , you can &apos;t find a new page to get a new page , you can use the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23169280092720881\n",
      "=====================================================\n",
      "..................................................Step  14500\n",
      "Actual: Then simply return to Europa Casino and go to the cashier , click on NETELLER , enter your private account details , and make an instant deposit ! </s> \n",
      "\n",
      "Predicted: After you check to the Casino Tropez then to the new , you on the account and the account account and and and you your online message . </s> \n",
      "(Train) BLEU (590 elements):  0.34222086345230945\n",
      "..................................................Step  15000\n",
      "Actual: Central heating , TV / DVD / VCR / CD / WiFi high speed ADSL internet connection , dishwasher , iron and ironing board , high quality bed cotton linens and towels . </s> \n",
      "\n",
      "Predicted: linens / , washing / CD / CD , DVD / DVD , speed internet internet access , ironing , ironing and ironing equipment . TV speed . , , , towels . </s> \n",
      "(Train) BLEU (500 elements):  0.35176439714465413\n",
      "============= Step  15000  =============\n",
      "\t Loss:  0.7801867706626654\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 Therefore , and all things are not ; for they are not a great . </s> \n",
      "\n",
      "DE:  In raschem Tempo werden die Modelle angepasst und erneuert .\n",
      "\n",
      "\t EN (TRUE):The models are quickly being improved and renewed .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> are used to the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> for the <unk> , and the <unk> , and the <unk> of the <unk> , the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> apartments in Conil de la Frontera , Cadiz , Spain , Spain . </s> \n",
      "\n",
      "DE:  Zitate mit unterschiedlichsten stilistischen Effekten treffen aufeinander : Referenzen auf das narrative Autorenkino ( Hitchcock , Eisenstein , Godard , Brian De Palma ) , poetische oder theoretische Texte ( Tschechow , Duras , Barthes , Žižek , Weibel , Gržinić ) und Verweise auf Massenmedien – B ##AT##-##AT## Filme , TV ##AT##-##AT## Shows , Werbespots , politische Nachrichtensendungen .\n",
      "\n",
      "\t EN (TRUE):Out of all this material , mixed with disnarrative polysemy and an astonishing lack of inhibition , strange “ fictions ” are reconstructed — fragmentary fictions that are constantly interrupted .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , with a variety of <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western Grand , <unk> , <unk> , France - 14 Guest reviews . </s> \n",
      "\n",
      "DE:  Zerstören Sie alle Blöcke , um zur nächsten Ebene zu gelangen .\n",
      "\n",
      "\t EN (TRUE):Destroy all the blocks to advance to the next level .\n",
      "\n",
      "\n",
      "\t EN (Predicted): click all the latest news to be used . </s> \n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "\t EN (TRUE):Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Ramada Kensington Hotel is a perfect place for a relaxing break . </s> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): NI ##AT##-##AT## DAQmx software and software development , NI LabVIEW and Vibration Measurement Suite , and LabVIEW software , and the LabVIEW and flexible of the NI Sound and Vibration are available to the NI <unk> and <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff was very friendly and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2435647966753814\n",
      "=====================================================\n",
      "..................................................Step  15500\n",
      "Actual: L &apos;accueil n &apos;est pas très <unk> ; il a <unk> <unk> plusieurs fois un extra ##AT##-##AT## bed ; la salle de petit déjeuner est très <unk> et à <unk> dans le hall de passage ; <unk> réception pour la <unk> , le bar de notre chambre était <unk> , il a <unk> <unk> qu &apos;il ne le <unk> pas \n",
      "\n",
      "Predicted: The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . <unk> <unk> . <unk> <unk> <unk> <unk> <unk> <unk> , <unk> <unk> <unk> <unk> <unk> <unk> . <unk> <unk> . <unk> . <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "(Train) BLEU (470 elements):  0.3519446842119462\n",
      "..................................................Step  16000\n",
      "Actual: The automatic settings usually give a good result . </s> \n",
      "\n",
      "Predicted: The <unk> of and you you user selection to </s> \n",
      "(Train) BLEU (580 elements):  0.3580390511131037\n",
      "============= Step  16000  =============\n",
      "\t Loss:  0.7808986428380013\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  &#124; Ferienwohnungen 1 Zi &#124; Ferienhäuser &#124; Landhäuser &#124; Autovermietung &#124; Last Minute Angebote ! !\n",
      "\n",
      "\t EN (TRUE):&#124; 1 Bedroom Apts &#124; Holiday houses &#124; Rural Homes &#124; Car Rental &#124; Last Minute Offers !\n",
      "\n",
      "\n",
      "\t EN (Predicted): &#124; Apartments &#124; Hostels &#124; Hostels &#124; Last Minute Offers ! </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Wherefore , the Lord of God , that the Lord shall be a b <unk> , and the b of the b earth , and b <unk> , and the b of the land of the land of the land , and the b <unk> of the land of the land of the land of the land of the \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): I am , I was not really happy to get a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot of a lot \n",
      "\n",
      "DE:  Im Allgemeinen basieren sie auf Datenbanken , Templates und Skripts .\n",
      "\n",
      "\t EN (TRUE):In general they are based on databases , template and scripts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Zitate mit unterschiedlichsten stilistischen Effekten treffen aufeinander : Referenzen auf das narrative Autorenkino ( Hitchcock , Eisenstein , Godard , Brian De Palma ) , poetische oder theoretische Texte ( Tschechow , Duras , Barthes , Žižek , Weibel , Gržinić ) und Verweise auf Massenmedien – B ##AT##-##AT## Filme , TV ##AT##-##AT## Shows , Werbespots , politische Nachrichtensendungen .\n",
      "\n",
      "\t EN (TRUE):Out of all this material , mixed with disnarrative polysemy and an astonishing lack of inhibition , strange “ fictions ” are reconstructed — fragmentary fictions that are constantly interrupted .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Die Deutschen sind schließlich nicht mehr dieselben , und Greuel gab es auf beiden Seiten dieser Front ; vergessen wir alle diejenigen , die die Orden und Medaillen des 9. Mai tragen - es sind doch so viele Jahre vergangen .\n",
      "\n",
      "\t EN (TRUE):Afterall &#91; they say &#93; , the Germans are no longer the same , and there was cruelty on both sides of the front ; let &apos;s forget all those who wear the medals of 9 May – so many years have passed since .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we have to know that the <unk> , we are not only , but they are not only , but they are not only , but they are not only about the same time . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): But , he said that the <unk> was not a problem , but he was a <unk> of the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Jeder Wikitraveler kann Artikel verändern , neue Seiten erstellen und sogar Informationen über die Seite selbst überschreiben .\n",
      "\n",
      "\t EN (TRUE):Any Wikitraveller can change articles , rewrite navigation areas , even overwrite information about the site itself .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a new version of the pages and the information about the information about the information . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> , and the <unk> , the <unk> , and the <unk> of the <unk> , the <unk> is a great place . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2364453749209786\n",
      "=====================================================\n",
      "..................................................Step  16500\n",
      "Actual: From the comfort of this traditional building you can enjoy the calming views of the sea and the cliff side of Church of The Blessed Virgin Mary . </s> \n",
      "\n",
      "Predicted: Enjoy the hotel of the hotel hotel , can enjoy the comfort comfort of the sea and the sea of of the . the <unk> <unk> . . </s> \n",
      "(Train) BLEU (450 elements):  0.370244319152634\n",
      "..................................................Step  17000\n",
      "Actual: A non smoking hotel located in the city centre was built in 2002 and benefits from a direct connection to Aalborg Congress Centre . The hotel has a modern Danish design . </s> \n",
      "\n",
      "Predicted: The family ##AT##-##AT## hotel is in the centre centre , a in the , the from the very access with the . Centre . </s> \n",
      "(Train) BLEU (380 elements):  0.34725247161624356\n",
      "============= Step  17000  =============\n",
      "\t Loss:  0.7957608043402433\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we can also be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This is the first step of the <unk> , which is the same time to the <unk> , and the <unk> ##AT##-##AT## <unk> is the <unk> . </s> \n",
      "\n",
      "DE:  Leicht und ergonomisch gebaut , mit einer Hand zu bedienen , stellen diese Messgeräte eine wirtschaftliche Lösung dar , wenn bei Verdacht auf Wanddickenverlust schnell geprüft werden soll .\n",
      "\n",
      "\t EN (TRUE):Lightweight and ergonomically designed for easy one ##AT##-##AT## hand operation , these gages provide cost ##AT##-##AT## effective measurement solutions in many applications that require quick inspection of materials suspected of metal wall thinning .\n",
      "\n",
      "\n",
      "\t EN (Predicted): with a great deal with the <unk> , the <unk> of the <unk> , the <unk> of the <unk> <unk> , the <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> and <unk> , the <unk> and <unk> <unk> is a powerful tool to create a new computer or a user ##AT##-##AT## defined password . </s> \n",
      "\n",
      "DE:  Es war staubig , das Bad schmutzig . Sogar die Beleuchtung an der Wand im Flur ( Seitengebäude ) war richtig verstaubt .\n",
      "\n",
      "\t EN (TRUE):It was rather old fashioned in the decoration .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> was very nice . </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western <unk> , <unk> - 20 Guest reviews . </s> \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): litres of many members of the <unk> , the <unk> <unk> , the <unk> and <unk> of the <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You can also find the <unk> and the <unk> . . . </s> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22703090084937794\n",
      "=====================================================\n",
      "..................................................Step  17500\n",
      "Actual: The most remarkable of these promises are that through his offspring , nations all over the world will come to worship God . </s> \n",
      "\n",
      "Predicted: The most important of the has in very it the <unk> , the , the the world . not to the . . </s> \n",
      "(Train) BLEU (490 elements):  0.37734801177545063\n",
      "..................................................Step  18000\n",
      "Actual: Native Postscript Output : with the built ##AT##-##AT## in Postscript Generator you can create all output - including graphics and bar codes - in the best possible output quality for your Postscript Printer . </s> \n",
      "\n",
      "Predicted: <unk> <unk> : : The a <unk> ##AT##-##AT## <unk> ##AT##-##AT## , : will use a the and <unk> <unk> formats <unk> codes . in addition same quality manner . . the data . . </s> \n",
      "(Train) BLEU (620 elements):  0.3730907517562961\n",
      "============= Step  18000  =============\n",
      "\t Loss:  0.766385872155428\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is a great location in the heart of the city , and a short walk from the airport and the metro station . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> and the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Residenz City Lodge befindet sich am mandelförmigen Sweelinckplein im Herzen des schicken Duinoord ##AT##-##AT## Viertels in Den Haag .\n",
      "\n",
      "\t EN (TRUE):In the midst of the bustling city life , an oasis of peace and luxury can be found bordering the beautiful Haagsche Park , across from the main train station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> Lodge is located in the heart of the <unk> district , in the heart of the city centre . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> to a third party , and the other . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be downloaded to the new <unk> Flash Player ! </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western <unk> , <unk> , Austria - 26 Guest reviews . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Dr Goodheart , the first time of the <unk> , the <unk> of the <unk> of the <unk> of the <unk> of the <unk> of the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Royal Hotel is a 100 m from the hotel . </s> \n",
      "\n",
      "DE:  Jeder Wikitraveler kann Artikel verändern , neue Seiten erstellen und sogar Informationen über die Seite selbst überschreiben .\n",
      "\n",
      "\t EN (TRUE):Any Wikitraveller can change articles , rewrite navigation areas , even overwrite information about the site itself .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a regular database , and the information about the pages of the page . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> of the hotel is the ideal venue for the <unk> Bar , the <unk> <unk> De <unk> - <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.24447349247943093\n",
      "=====================================================\n",
      "..................................................Step  18500\n",
      "Actual: Some of the articles about what has been published about our environmental program . . . </s> \n",
      "\n",
      "Predicted: Many of the most of the you been published . the new . . </s> \n",
      "(Train) BLEU (480 elements):  0.34952736745117896\n",
      "..................................................Step  19000\n",
      "Actual: Click Purchase Selected Items in the toolbar at the bottom of your lightbox . </s> \n",
      "\n",
      "Predicted: Click to &quot; &quot; to the &quot; &quot; the bottom of the &quot; button </s> \n",
      "(Train) BLEU (500 elements):  0.35736726447622724\n",
      "============= Step  19000  =============\n",
      "\t Loss:  0.7702746467292308\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Der nordwestliche Teil der Insel besteht aus Granit und Gneis , von Ton überlagert , und bildet eine ca.\n",
      "\n",
      "\t EN (TRUE):A battle between Denmark and Sweden in 1645 led to Swedish control of the island , but it was brief - they left again the same year . In the Roskildepeace of 1658 Bornholm , Skaane , Halland and Blekinge were given to Sweden .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a <unk> and <unk> , and is a small town . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great place to enjoy the <unk> of the <unk> and the <unk> of the <unk> <unk> and the <unk> <unk> , the <unk> <unk> <unk> and the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Es existieren Busverbindungen in nahezu jeden Ort der Provence ( eventuell mit Umsteigen in Aix ##AT##-##AT## en ##AT##-##AT## Provence ) , allerdings sollte beachtet werden , dass die letzten Busse abends ca. um 19 Uhr fahren .\n",
      "\n",
      "\t EN (TRUE):As always in France those highways are expensive but practical , comfortable and fast .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ( <unk> ) , <unk> ( <unk> ) , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the user interface , the user interface and the powerful tool allows to create the ideal tool to use the tool to use the tool to use the tool to use the tool to use the tool to use the image . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The SCXI ##AT##-##AT## <unk> module is a powerful module for the workstation . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is located in the <unk> Valley , the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> to the <unk> ##AT##-##AT## <unk> . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> you will find the best time to help you can get a look for your stay . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Luxury Suite Rooms offer a spacious with modern facilities , free Wi ##AT##-##AT## Fi and free internet access . </s> \n",
      "\n",
      "DE:  Sehr freundliche Auszubildende an der Rezeption , die sehr bemüht noch einen Flug für mich gebucht hat .\n",
      "\n",
      "\t EN (TRUE):First of all I did not like the price ... the next day I went to Milano to a 4 star Hotel for 10 Euro less and super service .. I had a problem with my Internetconnection and the Hotel Maritim did not react right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff was very friendly and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.24259060935184412\n",
      "=====================================================\n",
      "..................................................Step  19500\n",
      "Actual: Room Notes : City hotel in country surroundings <unk> suite double room for SINGLE <unk> , hair dryer , digital TV / Radio totaling around 200 channels , tea and coffee making facilities . </s> \n",
      "\n",
      "Predicted: Room Notes : This Hotel is the , in in with rooms with adults <unk> , <unk> dryer , tea TV , DVD TV , 200 and , and and coffee making facilities . </s> \n",
      "(Train) BLEU (400 elements):  0.36484170384690684\n",
      "..................................................Step  20000\n",
      "Actual: The Gambia formed a short ##AT##-##AT## lived federation of <unk> with Senegal between 1982 and 1989 . In 1991 the two nations signed a friendship and cooperation treaty . </s> \n",
      "\n",
      "Predicted: In staff and by member journey term and and the and the . the and the . </s> \n",
      "(Train) BLEU (620 elements):  0.3666478616137287\n",
      "============= Step  20000  =============\n",
      "\t Loss:  0.7753661271035671\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): These are available in the following pages , and ® ® , and the <unk> ® ® , and the <unk> ® ® , and the <unk> ® ® , and the <unk> ® ® , and the <unk> ® ® , and the <unk> ® ® , the <unk> ® ® ® , and the <unk> ® ® , \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Wherefore , the Lord God is a <unk> of God , that ye shall come forth into the land of the land , saith , saith , b <unk> , and b <unk> , and the b <unk> of the land of the land of the land , and the c <unk> of the land of the land of \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Eine Woche später wird Dianne Feinstein , Vorstandsvorsitzende der Inspektoren , als Nachfolgerin Moscones ernannt . Sie ist die erste Bürgermeisterin der Stadt .\n",
      "\n",
      "\t EN (TRUE):Returning by the parallel Stockton or Powell will give you a better feeling of the day to day life of the residents , and are both good for those looking for imported commodities such as tea or herbs .\n",
      "\n",
      "\n",
      "\t EN (Predicted): A week will be charged at the <unk> , as well as the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The two <unk> <unk> - <unk> <unk> <unk> <unk> <unk> is a great choice for the future of the <unk> . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is located in the heart of the <unk> , the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each of the <unk> is a great and friendly environment . </s> \n",
      "\n",
      "DE:  Das ist eine Metapher , wird jemand von der Propagandaabteilung entgegnen .\n",
      "\n",
      "\t EN (TRUE):It &apos;s only a metaphor , people from the propaganda department will say .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is the most important of the <unk> . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Luxury Superior Rooms are decorated with a double bed , with a double bed and a single bed . </s> \n",
      "\n",
      "DE:  Es gibt in der Nähe kein Stadtzentrum , in dem man abends beruhigt spazieren gehen könnte . Zu Fuß braucht man in das Zentrum Bournemouths 25 min .\n",
      "\n",
      "\t EN (TRUE):Also , the possibility of a small corner play area for kids in restuarant so that adults can eat in peace and with peace of mind .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> and <unk> is a bit expensive . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2361756596405626\n",
      "=====================================================\n",
      "..................................................Step  20500\n",
      "Actual: Planning to organize an international seminar in Peru ? </s> \n",
      "\n",
      "Predicted: For to the a international person or the , </s> \n",
      "(Train) BLEU (450 elements):  0.3632393925444787\n",
      "..................................................Step  21000\n",
      "Actual: <unk> is cheaper than similar products and available for Linux . </s> \n",
      "\n",
      "Predicted: <unk> is a than more as and the in Linux Linux </s> \n",
      "(Train) BLEU (660 elements):  0.3510215682746442\n",
      "============= Step  21000  =============\n",
      "\t Loss:  0.7895791996121406\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we did not have to pay the time that we had to pay the price of the room and the room was very small and we had to pay the room with the shower tub and the shower was very small . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a great choice of the <unk> <unk> <unk> and the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very nice and the room was very nice . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): I did not like to stay in the room . </s> \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Enjoy the best of the best hotel in the city centre , you can enjoy your holiday in a romantic holiday . </s> \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a number of <unk> and <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Wünschen Sie Unterstützung bei der der Zentrensuche ?\n",
      "\n",
      "\t EN (TRUE):Would you like being assisted in searching a specialised centre ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can purchase the support of the project ? </s> \n",
      "\n",
      "DE:  Das ist eine Metapher , wird jemand von der Propagandaabteilung entgegnen .\n",
      "\n",
      "\t EN (TRUE):It &apos;s only a metaphor , people from the propaganda department will say .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a <unk> . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our standard rooms are located in the <unk> district , with a high standard , and a very central location , just a few minutes from the city centre . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> Video Poker is a real time , the video video is a video video , which is a great idea of the EOS 40D , which is the most of the most important parts of the world , which is the most of the most important parts of the world . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.19767268928534704\n",
      "=====================================================\n",
      "..................................................Step  21500\n",
      "Actual: Prior to casting , a number of identical parts are attached to a wax ‘ trunk ’ so that when completed the structure has the form of a wax ‘ tree ’ , the parts being the ‘ branches ’ . </s> \n",
      "\n",
      "Predicted: The to a <unk> a number of a in of not to the number of <unk> , s that the the by <unk> of been same of a number of <unk> . s which <unk> of used same <unk> . s </s> \n",
      "(Train) BLEU (500 elements):  0.3507924819950598\n",
      "..................................................Step  22000\n",
      "Actual: The aim of the task was to fully mill an extrusion die in PM steel ( 1 <unk> <unk> ##AT##-##AT## 13 ) , with a hardness of <unk> . </s> \n",
      "\n",
      "Predicted: <unk> <unk> of the <unk> was a be a in <unk> ##AT##-##AT## <unk> <unk> 1 , <unk> ) ) ) <unk> ##AT##-##AT## . which a <unk> of <unk> . </s> \n",
      "(Train) BLEU (480 elements):  0.3728390171583663\n",
      "============= Step  22000  =============\n",
      "\t Loss:  0.7777903161942958\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel offers a wide range of cocktails and a wide range of cocktails . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , or the <unk> <unk> <unk> , and the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): I &apos;m not sure that you have a lot of fun , and you can enjoy a lot of fun and more . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 , 15 , 15 , 15 , and 15 days of the date of the rules . </s> \n",
      "\n",
      "DE:  Es war staubig , das Bad schmutzig . Sogar die Beleuchtung an der Wand im Flur ( Seitengebäude ) war richtig verstaubt .\n",
      "\n",
      "\t EN (TRUE):It was rather old fashioned in the decoration .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> was very helpful and the staff was very helpful and courteous . </s> \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at <unk> <unk> Boutique . </s> \n",
      "\n",
      "DE:  Naturreservat auf aufgeschüttetem Gelände am Río de la Plata .\n",
      "\n",
      "\t EN (TRUE):Wide selection of main courses including fresh pasta in homemade sauces ( $ 15 ##AT##-##AT## 30AR ) , traditional chicken dishes incuding Chicken Marsala ( $ 20AR- $ 30AR ) , and a variety of meats including Argentine parilla style steaks ( $ 35AR ) . The menu of seafood is worth considering with rareties such as fresh Yellow ##AT##-##AT## fin Tuna steak in a pesto sauce ( $ 30AR ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel &apos;s location , the hotel is located on the seafront . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): audiences to the <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> , and the <unk> of the <unk> , and the <unk> of the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): &quot; The &quot; <unk> &quot; , the &quot; <unk> &quot; , the <unk> of the <unk> , the <unk> of the <unk> , and the <unk> of the <unk> , and the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , and the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Sehr freundliche Auszubildende an der Rezeption , die sehr bemüht noch einen Flug für mich gebucht hat .\n",
      "\n",
      "\t EN (TRUE):First of all I did not like the price ... the next day I went to Milano to a 4 star Hotel for 10 Euro less and super service .. I had a problem with my Internetconnection and the Hotel Maritim did not react right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff was very helpful and courteous . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22720226767356938\n",
      "=====================================================\n",
      "..................................................Step  22500\n",
      "Actual: <unk> <unk> , очень <unk> и <unk> <unk> <unk> . </s> \n",
      "\n",
      "Predicted: The was , <unk> <unk> , <unk> , . . </s> \n",
      "(Train) BLEU (570 elements):  0.3566682481052772\n",
      "..................................................Step  23000\n",
      "Actual: Hot meals , cakes and pastries are served here from 12 : 00 until 22 : 30 . </s> \n",
      "\n",
      "Predicted: <unk> ##AT##-##AT## , and and dishes , served from from 12 : 00 to 22 : 30 . </s> \n",
      "(Train) BLEU (500 elements):  0.3752759768050251\n",
      "============= Step  23000  =============\n",
      "\t Loss:  0.770475715532899\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a charming , quiet location in the city centre . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): it is possible to be able to move the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Residenz City Lodge befindet sich am mandelförmigen Sweelinckplein im Herzen des schicken Duinoord ##AT##-##AT## Viertels in Den Haag .\n",
      "\n",
      "\t EN (TRUE):In the midst of the bustling city life , an oasis of peace and luxury can be found bordering the beautiful Haagsche Park , across from the main train station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): City Centre City is located in the heart of the city . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): is a few seconds on the client . </s> \n",
      "\n",
      "DE:  Es war staubig , das Bad schmutzig . Sogar die Beleuchtung an der Wand im Flur ( Seitengebäude ) war richtig verstaubt .\n",
      "\n",
      "\t EN (TRUE):It was rather old fashioned in the decoration .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> was a small and the room was very noisy . </s> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is the most popular and most of the <unk> , and the <unk> <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , and <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  With a unique location in the heart of Peneda / Gerês National Park , this Pousada has a breathking view over the river Cávado and the peaceful Caniçada dam .\n",
      "\n",
      "\t EN (TRUE):Located in the heart of Peneda ##AT##-##AT## Gerês National Park , this guest house boasts panoramic views of the surrounding mountains and is a welcome retreat for nature enthusiasts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a family ##AT##-##AT## run hotel is located in the heart of <unk> , <unk> , <unk> , <unk> , <unk> , <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): It is also a few of the most popular , but it is also a problem . </s> \n",
      "\n",
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> and the <unk> Bar is located in the <unk> of the <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22023729120751678\n",
      "=====================================================\n",
      "..................................................Step  23500\n",
      "Actual: When developing high ##AT##-##AT## volume systems , developers can afford to <unk> the time and expense of register ##AT##-##AT## level programming across many systems . </s> \n",
      "\n",
      "Predicted: With using systems ##AT##-##AT## resolution systems , you are be the be , same to can of the to to systems systems the systems . </s> \n",
      "(Train) BLEU (420 elements):  0.3550899261512781\n",
      "..................................................Step  24000\n",
      "Actual: Thus , it is not unusual today , someone more or less well ##AT##-##AT## informed , has several email accounts ( e ##AT##-##AT## mail ) , one or multiple accounts on social networks ( Facebook , Twitter , MySpace just to name a few ) and friends using an instant messaging different from hers ( MSN Live / Hotmail , \n",
      "\n",
      "Predicted: It , it is a a to , and who than a than as being : you a questions address , see <unk> mail address . and of more . . the ! . e ! etc ) etc , ) the ! <unk> mouse . you . the error view . . the ! I ) ) <unk> ) \n",
      "(Train) BLEU (670 elements):  0.36041900454202475\n",
      "============= Step  24000  =============\n",
      "\t Loss:  0.7748530296832323\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Der nordwestliche Teil der Insel besteht aus Granit und Gneis , von Ton überlagert , und bildet eine ca.\n",
      "\n",
      "\t EN (TRUE):A battle between Denmark and Sweden in 1645 led to Swedish control of the island , but it was brief - they left again the same year . In the Roskildepeace of 1658 Bornholm , Skaane , Halland and Blekinge were given to Sweden .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , and <unk> , <unk> , and <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Munnin will be used to be the same time . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): 11 : <unk> : <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can download the flash package ! </s> \n",
      "\n",
      "DE:  Die Deutschen sind schließlich nicht mehr dieselben , und Greuel gab es auf beiden Seiten dieser Front ; vergessen wir alle diejenigen , die die Orden und Medaillen des 9. Mai tragen - es sind doch so viele Jahre vergangen .\n",
      "\n",
      "\t EN (TRUE):Afterall &#91; they say &#93; , the Germans are no longer the same , and there was cruelty on both sides of the front ; let &apos;s forget all those who wear the medals of 9 May – so many years have passed since .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The majority of the United States , and the <unk> of the <unk> , and the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each person and the actions are not . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is situated in the heart of the city . </s> \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can use the <unk> <unk> ##AT##-##AT## <unk> for the <unk> <unk> , in the <unk> <unk> , in the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> Video Poker is a new version of the Poker Video Poker , which is a great choice of the first time of the first time , the <unk> of the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.22278646486425938\n",
      "=====================================================\n",
      "..................................................Step  24500\n",
      "Actual: Barcelona , Spain is a city located at the northeast side of the Iberian Peninsula , in the heart of Catalonia and bordered by the Mediterranean Sea to the east . </s> \n",
      "\n",
      "Predicted: Barcelona is the is located perfect centre in the heart of of the city Peninsula . which the heart of the . is by the <unk> Sea . the north . </s> \n",
      "(Train) BLEU (490 elements):  0.36802720431623925\n",
      "..................................................Step  25000\n",
      "Actual: In addition to the standard lens , the camera offers support to an abundance of lenses , among which the Type G and D AF Nikkor lenses without built ##AT##-##AT## in motor . </s> \n",
      "\n",
      "Predicted: The the , the <unk> of , the <unk> and a to the array of the and and the the <unk> ##AT##-##AT## ##AT##-##AT## D ##AT##-##AT## . ##AT##-##AT## . a ##AT##-##AT## in . . </s> \n",
      "(Train) BLEU (550 elements):  0.3759763580119075\n",
      "============= Step  25000  =============\n",
      "\t Loss:  0.7637289370596408\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a very quiet location in the city centre , close to the railway station and the underground station . </s> \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is located in the heart of the city , close to the <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Dieses 4 ##AT##-##AT## Sterne ##AT##-##AT## Landhotel aus dem 18. Jahrhundert inmitten einer ländlichen Umgebung ist nur eine kurze Fahrt vom Stadtzentrum von Londonderry und vom örtlichen Flughafen entfernt .\n",
      "\n",
      "\t EN (TRUE):This 4 ##AT##-##AT## star 18th century country house hotel is situated in the countryside , just a short drive from Derry city centre and within reach of the City of Derry Airport .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a 4 ##AT##-##AT## star hotel in the heart of the city centre , just a few minutes from the centre of <unk> , and the <unk> Airport . </s> \n",
      "\n",
      "DE:  Genießen Sie hier in gemütlicher Atmosphäre ein kühles Kölsch oder einen erfrischenden Cocktail .\n",
      "\n",
      "\t EN (TRUE):Enjoy a local beer or refreshing cocktail in a cosy atmosphere .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Enjoy a relaxing retreat or a relaxing cocktail . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> of the <unk> of the <unk> of the <unk> of the <unk> , the <unk> of the <unk> , the <unk> <unk> <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> is the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> will be the best for the time and can be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to be able to \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): breakfast was very helpful and the staff was very helpful and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.22923169939727794\n",
      "=====================================================\n",
      "..................................................Step  25500\n",
      "Actual: Situated just minutes from London &apos;s <unk> station , these luxurious , contemporary apartments are within easy reach of the City and Canary Wharf . </s> \n",
      "\n",
      "Predicted: All in minutes away the ’ main , , just are apartments fully rooms are located walking reach of the city and the Wharf , </s> \n",
      "(Train) BLEU (530 elements):  0.3733869710163301\n",
      "..................................................Step  26000\n",
      "Actual: Interestingly enough , the title of Amin &apos;s book hints at that great classic of Western thought , Moses <unk> &apos;s The Guide for the <unk> &#91; <unk> , <unk> al ##AT##-##AT## Ha <unk> &#93; . </s> \n",
      "\n",
      "Predicted: The is is the <unk> of <unk> , <unk> , , the <unk> <unk> , the Europe , the , , <unk> <unk> <unk> the <unk> , <unk> &#93; the , <unk> <unk> , . . </s> \n",
      "(Train) BLEU (520 elements):  0.36963933972835655\n",
      "============= Step  26000  =============\n",
      "\t Loss:  0.7577761545628309\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Ideale Lage für Exkursionen in die Stadt und Nähe zur Promenade .\n",
      "\n",
      "\t EN (TRUE):There was plenty of space in the room and a nice garden to sit and have a drink and smoke .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel staff was very helpful and friendly . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): it is the right to the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Residenz City Lodge befindet sich am mandelförmigen Sweelinckplein im Herzen des schicken Duinoord ##AT##-##AT## Viertels in Den Haag .\n",
      "\n",
      "\t EN (TRUE):In the midst of the bustling city life , an oasis of peace and luxury can be found bordering the beautiful Haagsche Park , across from the main train station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Edinburgh Lodge Lodge is located in the heart of the city , close to the city centre . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> and the <unk> of the <unk> , the <unk> of the <unk> ( or &quot; ) &quot; . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> Flash Player ! </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): between the hotel . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a lot of the hotel staff are very helpful and friendly . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You can also find a lot of the best price . . . </s> \n",
      "\n",
      "DE:  Es gibt in der Nähe kein Stadtzentrum , in dem man abends beruhigt spazieren gehen könnte . Zu Fuß braucht man in das Zentrum Bournemouths 25 min .\n",
      "\n",
      "\t EN (TRUE):Also , the possibility of a small corner play area for kids in restuarant so that adults can eat in peace and with peace of mind .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.21388555582964344\n",
      "=====================================================\n",
      "..................................................Step  26500\n",
      "Actual: <unk> diligently unto me , and remember the words which I have spoken ; and come unto the Holy One of Israel , and c feast upon that which <unk> not , neither can be corrupted , and let your soul delight in <unk> . </s> \n",
      "\n",
      "Predicted: For , , me , and I , words of I have spoken unto yea I to you things Ghost of the , and the <unk> , the the I , , and , be b , and the them b , , the , </s> \n",
      "(Train) BLEU (460 elements):  0.3721340608417235\n",
      "..................................................Step  27000\n",
      "Actual: For a sweet treat try <unk> , made from grapes allowed to stay until the first hard freeze then pressed and made into a very sweet wine . </s> \n",
      "\n",
      "Predicted: In the long , a to , the a the to to the in the <unk> ##AT##-##AT## to , the the the a a 10 <unk> range . </s> \n",
      "(Train) BLEU (460 elements):  0.37052768159788707\n",
      "============= Step  27000  =============\n",
      "\t Loss:  0.7658500038683415\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a central location in the city centre , with a short walk from the city and train stations , and the underground station is just a short walk from the city centre . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , or <unk> , and the <unk> <unk> is a <unk> . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> , the <unk> and the <unk> tool to create a user to create a user or a user ##AT##-##AT## friendly interface . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a more than more than a language . </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western Hotell <unk> , <unk> , <unk> - 29 Guest reviews . </s> \n",
      "\n",
      "DE:  Naturreservat auf aufgeschüttetem Gelände am Río de la Plata .\n",
      "\n",
      "\t EN (TRUE):Wide selection of main courses including fresh pasta in homemade sauces ( $ 15 ##AT##-##AT## 30AR ) , traditional chicken dishes incuding Chicken Marsala ( $ 20AR- $ 30AR ) , and a variety of meats including Argentine parilla style steaks ( $ 35AR ) . The menu of seafood is worth considering with rareties such as fresh Yellow ##AT##-##AT## fin Tuna steak in a pesto sauce ( $ 30AR ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You can also enjoy a wide variety of sports , snowboarding and diving . . . </s> \n",
      "\n",
      "DE:  Bei den romanischen Völkern paart sich die effektive Ohnmacht mit lächerlicher Anmaßung .\n",
      "\n",
      "\t EN (TRUE):To material weakness the Latin countries add a quite fantastic pretentiousness .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.2049243678268133\n",
      "=====================================================\n",
      "..................................................Step  27500\n",
      "Actual: Our mission is providing poker players with information about the world of online poker . Learn the poker rules , use the right poker strategy and use this knowledge to earn a lot of money . </s> \n",
      "\n",
      "Predicted: The first in the a of for the for the <unk> &apos;s the . ! </s> \n",
      "(Train) BLEU (500 elements):  0.37910238492846365\n",
      "..................................................Step  28000\n",
      "Actual: Booking .com : Sheraton Neues Schloss Hotel , Zürich , Switzerland - 23 Guest reviews . </s> \n",
      "\n",
      "Predicted: Booking .com : Sheraton Sheraton Schloss Hotel , Zürich , Switzerland - 23 Guest reviews . </s> \n",
      "(Train) BLEU (620 elements):  0.37671297743257043\n",
      "============= Step  28000  =============\n",
      "\t Loss:  0.7586548285782337\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a perfect starting point for a good location , a short distance from the train station and the metro station . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): it is possible to be the best and easiest to the PC and the <unk> . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): room was very clean and tidy . </s> \n",
      "\n",
      "DE:  Zitate mit unterschiedlichsten stilistischen Effekten treffen aufeinander : Referenzen auf das narrative Autorenkino ( Hitchcock , Eisenstein , Godard , Brian De Palma ) , poetische oder theoretische Texte ( Tschechow , Duras , Barthes , Žižek , Weibel , Gržinić ) und Verweise auf Massenmedien – B ##AT##-##AT## Filme , TV ##AT##-##AT## Shows , Werbespots , politische Nachrichtensendungen .\n",
      "\n",
      "\t EN (TRUE):Out of all this material , mixed with disnarrative polysemy and an astonishing lack of inhibition , strange “ fictions ” are reconstructed — fragmentary fictions that are constantly interrupted .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you need to stay at the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Dr Goodheart , the <unk> <unk> , the <unk> , the <unk> , the <unk> of the <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , and the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> , the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> the hotel ’ s <unk> , the <unk> Bar , the <unk> Bar and the <unk> Bar , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23439886166162824\n",
      "=====================================================\n",
      "..................................................Step  28500\n",
      "Actual: And the more of us that participate , the louder the voice of global public opinion will be . You can give your own opinion in the poll and see the results so far , at this link : http : / / www <unk> <unk> / en / <unk> ##UNDERSCORE## poll / 98 <unk> ? CLICK ##UNDERSCORE## TF ##UNDERSCORE## \n",
      "\n",
      "Predicted: The if <unk> <unk> the , the in the <unk> <unk> <unk> of the <unk> : : be used </s> \n",
      "(Train) BLEU (430 elements):  0.38077912903006844\n",
      "..................................................Step  29000\n",
      "Actual: The Development Youth Prize is open to schools in the 27 member states of the European Union . </s> \n",
      "\n",
      "Predicted: In <unk> of <unk> , a to 27 in the European ##AT##-##AT## of . the European Union . </s> \n",
      "(Train) BLEU (500 elements):  0.3723885698700694\n",
      "============= Step  29000  =============\n",
      "\t Loss:  0.7545912840366363\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  In der Hotelbeschreibung im Internet müßte die Zufahrt beschrieben werden .\n",
      "\n",
      "\t EN (TRUE):There are no adverse comments about this hotel at all .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a great place to enjoy the <unk> of the <unk> <unk> and the <unk> <unk> <unk> and the <unk> <unk> <unk> <unk> , the <unk> <unk> <unk> and the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Dieses 4 ##AT##-##AT## Sterne ##AT##-##AT## Landhotel aus dem 18. Jahrhundert inmitten einer ländlichen Umgebung ist nur eine kurze Fahrt vom Stadtzentrum von Londonderry und vom örtlichen Flughafen entfernt .\n",
      "\n",
      "\t EN (TRUE):This 4 ##AT##-##AT## star 18th century country house hotel is situated in the countryside , just a short drive from Derry city centre and within reach of the City of Derry Airport .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This 4 ##AT##-##AT## star hotel is located in a quiet area of the city centre , just a short walk from the city centre and the airport . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Im Allgemeinen basieren sie auf Datenbanken , Templates und Skripts .\n",
      "\n",
      "\t EN (TRUE):In general they are based on databases , template and scripts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the new data and data is available . </s> \n",
      "\n",
      "DE:  Zitate mit unterschiedlichsten stilistischen Effekten treffen aufeinander : Referenzen auf das narrative Autorenkino ( Hitchcock , Eisenstein , Godard , Brian De Palma ) , poetische oder theoretische Texte ( Tschechow , Duras , Barthes , Žižek , Weibel , Gržinić ) und Verweise auf Massenmedien – B ##AT##-##AT## Filme , TV ##AT##-##AT## Shows , Werbespots , politische Nachrichtensendungen .\n",
      "\n",
      "\t EN (TRUE):Out of all this material , mixed with disnarrative polysemy and an astonishing lack of inhibition , strange “ fictions ” are reconstructed — fragmentary fictions that are constantly interrupted .\n",
      "\n",
      "\n",
      "\t EN (Predicted): reviews , including a variety of accomodations options , including the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at <unk> Boutique Hotel . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / <unk> <unk> . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): audiences from the <unk> to the <unk> <unk> , in the middle of Berlin , in the heart of the city , between the city and the <unk> . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also find . . . </s> \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff were friendly and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23827490770627427\n",
      "=====================================================\n",
      "..................................................Step  29500\n",
      "Actual: 04 / 08 / 09 Las <unk> de una <unk> de <unk> y <unk> <unk> . 04 / 08 / 09 Los <unk> mas <unk> Que se <unk> en el Mundo . </s> \n",
      "\n",
      "Predicted: <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> la <unk> <unk> <unk> <unk> <unk> <unk> <unk> </s> \n",
      "(Train) BLEU (570 elements):  0.38656194623561935\n",
      "..................................................Step  30000\n",
      "Actual: That can be explained by the fact that some peanuts have been added to the product <unk> , which is appreciated by some testers and not by some others . </s> \n",
      "\n",
      "Predicted: This &apos;s be a by the <unk> that the of in to <unk> to the <unk> , , which is not . the of . the . the of . </s> \n",
      "(Train) BLEU (570 elements):  0.3787093499169663\n",
      "============= Step  30000  =============\n",
      "\t Loss:  0.744307940095663\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Ideale Lage für Exkursionen in die Stadt und Nähe zur Promenade .\n",
      "\n",
      "\t EN (TRUE):There was plenty of space in the room and a nice garden to sit and have a drink and smoke .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel staff was very helpful and helpful . </s> \n",
      "\n",
      "DE:  Alle unterstützten Barcode Varianten sind in einem einzigen Interface konfigurierbar .\n",
      "\n",
      "\t EN (TRUE):All supported bar code formats are configurable through one single interface .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Vector barcode are available in a single <unk> . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The apartment is located in the <unk> <unk> , in a quiet residential area of the <unk> River . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): room was very comfortable and the location was very nice . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> of the <unk> of the <unk> are the most popular and most of the most important areas of the world . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great starting point for exploring the city . </s> \n",
      "\n",
      "DE:  Wünschen Sie Unterstützung bei der der Zentrensuche ?\n",
      "\n",
      "\t EN (TRUE):Would you like being assisted in searching a specialised centre ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will receive the support of the <unk> ? </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also enjoy the diving and leisure . . . </s> \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff were very helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2415541773561217\n",
      "=====================================================\n",
      "..................................................Step  30500\n",
      "Actual: The villas also boast gardens or terraces with their own private outdoor jacuzzi . </s> \n",
      "\n",
      "Predicted: The hotel also includes a , gardens . a own private swimming . . </s> \n",
      "(Train) BLEU (580 elements):  0.3805748808309842\n",
      "..................................................Step  31000\n",
      "Actual: a ) The speed in which the human brain and body can act on incoming information limits the speed in which we can deal with the natural environment . This speed is close to 30 km / h , i <unk> . </s> \n",
      "\n",
      "Predicted: The <unk> , <unk> is the is <unk> <unk> , <unk> is be with the , , , <unk> of the is are be with a <unk> environment . </s> \n",
      "(Train) BLEU (610 elements):  0.38156939496912873\n",
      "============= Step  31000  =============\n",
      "\t Loss:  0.7473985143303871\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 Wo unto the words of the words are not a great ; and they are not not always not a great . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 For behold , he also shall be b judged , and the <unk> of the people , and the people of men , and they shall be b judged , and they shall be b judged . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible at a location nearby and costs EUR 3 <unk> per day . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): When you use the client client will be used to be displayed . </s> \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Enjoy the hotel ’ s <unk> , the hotel is located in the centre of the city , offering a private outdoor swimming pool and a large outdoor swimming pool . </s> \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very clean and the rooms were very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and the toilet was very clean and \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): members of many different levels of the quality of the quality of the quality of the quality of the quality of the quality of the <unk> , and the <unk> of <unk> . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located just 100 metres from the Acropolis of the <unk> . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> of the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , the <unk> , \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2068015806156535\n",
      "=====================================================\n",
      "..................................................Step  31500\n",
      "Actual: Featuring convenient access to popular Niagara Falls , Ontario attractions , including the world ##AT##-##AT## famous <unk> Falls , this completely non ##AT##-##AT## smoking hotel provides comfortable accommodations and a . . . </s> \n",
      "\n",
      "Predicted: The a accommodation to the attractions Falls , this Palace , this the <unk> ##AT##-##AT## famous city , , this hotel refurbished ##AT##-##AT## smoking hotel is a accommodation in free central . . </s> \n",
      "(Train) BLEU (520 elements):  0.3747416186927701\n",
      "..................................................Step  32000\n",
      "Actual: In this district you can also find Belize &apos;s largest body of water , the New River Lagoon . Orange Walk District also includes the ancient Maya <unk> . </s> \n",
      "\n",
      "Predicted: <unk> the area , will find find the &apos;s most city , the , and <unk> York , , </s> \n",
      "(Train) BLEU (600 elements):  0.3886853894877249\n",
      "============= Step  32000  =============\n",
      "\t Loss:  0.7479483888894319\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will find your first time in the <unk> <unk> , but the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy the traditional Italian cuisine . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible at 3 EUR at 3 <unk> per day . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): apartments in Conil de la Frontera . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> di <unk> is a more than one one of the world &apos;s most important language . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very small . </s> \n",
      "\n",
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be able to install the <unk> <unk> 6 <unk> <unk> . </s> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): One older child or adult is charged USD 23 <unk> per night when using existing bedding . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our Classic Deluxe Rooms are located in the <unk> <unk> , offering a comfortable , comfortable , modern hotel with a private balcony . </s> \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean and the bathroom was clean \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23361007639985387\n",
      "=====================================================\n",
      "..................................................Step  32500\n",
      "Actual: Hotel situated in the historical centre of Milan , only 5 minutes walking from the Duomo , Galleria Vittorio Emanuele , Teatro alla Scala . </s> \n",
      "\n",
      "Predicted: The <unk> is the centre centre of the , this 4 new from distance the centre and Hotel ##AT##-##AT## Hotel to the House <unk> . </s> \n",
      "(Train) BLEU (420 elements):  0.38103420768468416\n",
      "..................................................Step  33000\n",
      "Actual: For every dog which knows how to and likes to run . </s> \n",
      "\n",
      "Predicted: For all one , is the to do the . the the </s> \n",
      "(Train) BLEU (500 elements):  0.3910073812395493\n",
      "============= Step  33000  =============\n",
      "\t Loss:  0.7382571136057376\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we have a lot of time in the time of the period of the time of the period of the <unk> and the <unk> of the <unk> ( <unk> ) and the <unk> of the <unk> , we can be able to be able to be able to be able to be able to be able to be able to \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be able to enjoy the best of the best hotels in the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Leicht und ergonomisch gebaut , mit einer Hand zu bedienen , stellen diese Messgeräte eine wirtschaftliche Lösung dar , wenn bei Verdacht auf Wanddickenverlust schnell geprüft werden soll .\n",
      "\n",
      "\t EN (TRUE):Lightweight and ergonomically designed for easy one ##AT##-##AT## hand operation , these gages provide cost ##AT##-##AT## effective measurement solutions in many applications that require quick inspection of materials suspected of metal wall thinning .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> , and a <unk> will be a <unk> to be a good way to be a good way to be a bit of a way to be . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If you are running on the client client , you will be able to use the client . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This module includes the NI USB ##AT##-##AT## <unk> , which is required to use the <unk> of the <unk> , which is a real ##AT##-##AT## time basis for the <unk> . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is located in the <unk> Valley , and is the best way to explore the best shopping and shopping areas . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a number of <unk> . </s> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): One older child or adult is charged USD 23 <unk> per night when using existing bedding . </s> \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> <unk> <unk> , the <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23014600429428136\n",
      "=====================================================\n",
      "..................................................Step  33500\n",
      "Actual: <unk> covers the use of &quot; tabs &quot; on a webpage , that can be clicked to see the information related to the tab &apos;s label . </s> \n",
      "\n",
      "Predicted: <unk> is the ability of the <unk> &quot; , the website page which is be used on a the information on to the current . . . </s> \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Train) BLEU (590 elements):  0.3819485167570491\n",
      "..................................................Step  34000\n",
      "Actual: And while Brussels insists Roma integration must remain a priority for Bulgaria and Romania – and throughout the bloc – few believe the amount of funds that has been made available can remove the obstacles preventing upward mobility among the Roma . </s> \n",
      "\n",
      "Predicted: All they they , , , with be be few of the . <unk> . and the the <unk> . <unk> years in <unk> of the . are been made . . be the same . . . . the <unk> . </s> \n",
      "(Train) BLEU (440 elements):  0.395429988175639\n",
      "============= Step  34000  =============\n",
      "\t Loss:  0.7410071367770433\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we would like to spend a time to the time of the time , and we had to be able to be able to be able to get the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Hotel is located in the heart of the city , near the <unk> , <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible on site and costs EUR 3 <unk> per day . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the data is stored on the workstation . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This module includes the ability to the workstation , which can be used to be a real ##AT##-##AT## time application that is required for a new application . </s> \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): and the hotel was very good . </s> \n",
      "\n",
      "DE:  Hotelparkplätze sind gegen eine kleine Gebühr vorhanden .\n",
      "\n",
      "\t EN (TRUE):Car Parking is available at the hotel at a small charge . ( check in advance as spaces are limited and certain conditions apply ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel is located in the centre of the city . </s> \n",
      "\n",
      "DE:  Kosten Sie mediterrane Gerichte im preisgekrönten Restaurant Molyvos .\n",
      "\n",
      "\t EN (TRUE):Enjoy award winning Mediterranean cuisine at Molyvos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a delicious meal in the restaurant . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): this is better to be used for the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23410557447310354\n",
      "=====================================================\n",
      "..................................................Step  34500\n",
      "Actual: At work , you &apos;ll decide on important purchases for your company that could speed up your performance and improve the organization of your work . </s> \n",
      "\n",
      "Predicted: You the , the can be to the the for the company . is be the to work . the the future . the company . </s> \n",
      "(Train) BLEU (590 elements):  0.3665248391354899\n",
      "..................................................Step  35000\n",
      "Actual: Beautifully situated next to a canal just 5 minutes walk from the historic Market Square , Golden Tulip De &apos; Medici offers you first class recreational facilities and well ##AT##-##AT## equipped rooms including . . . </s> \n",
      "\n",
      "Predicted: The , in to the beautiful , 5 minutes from from the historic centre Square , the Tulip <unk> <unk> <unk> , a can ##AT##-##AT## . facilities . facilities ##AT##-##AT## equipped rooms . a . . </s> \n",
      "(Train) BLEU (490 elements):  0.3894425657953727\n",
      "============= Step  35000  =============\n",
      "\t Loss:  0.7283186328411102\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Ideale Lage für Exkursionen in die Stadt und Nähe zur Promenade .\n",
      "\n",
      "\t EN (TRUE):There was plenty of space in the room and a nice garden to sit and have a drink and smoke .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very friendly and helpful . </s> \n",
      "\n",
      "DE:  Alle unterstützten Barcode Varianten sind in einem einzigen Interface konfigurierbar .\n",
      "\n",
      "\t EN (TRUE):All supported bar code formats are configurable through one single interface .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All Alkacon OCEE are a real ##AT##-##AT## time . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you , and it is very much more . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): apartments in Conil de la Frontera , Cadiz , Spain . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> Flash Player ! </s> \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at <unk> <unk> . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the first ##AT##-##AT## step of the <unk> . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is the best way to make your favorite and use of the <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Sehr freundliche Auszubildende an der Rezeption , die sehr bemüht noch einen Flug für mich gebucht hat .\n",
      "\n",
      "\t EN (TRUE):First of all I did not like the price ... the next day I went to Milano to a 4 star Hotel for 10 Euro less and super service .. I had a problem with my Internetconnection and the Hotel Maritim did not react right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the location was very quiet . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.23409404767609848\n",
      "=====================================================\n",
      "..................................................Step  35500\n",
      "Actual: Please check the terms periodically for changes . </s> \n",
      "\n",
      "Predicted: If use with use of with the to </s> \n",
      "(Train) BLEU (510 elements):  0.3950990442421991\n",
      "..................................................Step  36000\n",
      "Actual: It &apos;s limited to 1024 characters in length . Any additional characters beyond 1024 will be truncated . </s> \n",
      "\n",
      "Predicted: The is is to the characters . the . </s> \n",
      "(Train) BLEU (460 elements):  0.396491199428965\n",
      "============= Step  36000  =============\n",
      "\t Loss:  0.7478607945442199\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is also a landmark and a complex . </s> \n",
      "\n",
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can use the <unk> installation that is used to be downloaded by the <unk> , which will be used to be used . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The apartments in the apartments are located on the edge of the <unk> River . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 : 15 , if a result of a message . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): it has been a new <unk> with the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 5 <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Wünschen Sie Unterstützung bei der der Zentrensuche ?\n",
      "\n",
      "\t EN (TRUE):Would you like being assisted in searching a specialised centre ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> support to help you ? </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is the best way to get around and you can easily reach the beach . </s> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): reliable and intuitive , the NI LabVIEW Real ##AT##-##AT## Time Module , LabVIEW and LabVIEW Real ##AT##-##AT## Time Module , and the LabVIEW Real ##AT##-##AT## Time Module , which includes a new application to the <unk> . </s> \n",
      "\n",
      "DE:  William Gross beschreibt die Bedeutung des Manuskripts für die Sammlung der Familie Gross .\n",
      "\n",
      "\t EN (TRUE):William Gross describes the significance of the manuscript to the Gross Family Collection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> of the family ##AT##-##AT## family family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## run family ##AT##-##AT## \n",
      "\n",
      "(Test) BLEU (100 elements):  0.24511416393933544\n",
      "=====================================================\n",
      "..................................................Step  36500\n",
      "Actual: The USS Excelsior ( NCC ##AT##-##AT## 2000 ) was a Federation starship that was in service from the late 23rd century through the late 24th century . </s> \n",
      "\n",
      "Predicted: The <unk> Enterprise ##AT##-##AT## <unk> ) <unk> ) is a <unk> starship in was the the , the early 23rd century , the <unk> 23rd century , </s> \n",
      "(Train) BLEU (520 elements):  0.39404482640917327\n",
      "..................................................Step  37000\n",
      "Actual: The guest reviews are submitted by our customers after their stay at Hotel <unk> . </s> \n",
      "\n",
      "Predicted: The guest reviews are submitted by our customers after their stay at Hotel <unk> . </s> \n",
      "(Train) BLEU (540 elements):  0.38419025067328644\n",
      "============= Step  37000  =============\n",
      "\t Loss:  0.7286767275780439\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  In der Hotelbeschreibung im Internet müßte die Zufahrt beschrieben werden .\n",
      "\n",
      "\t EN (TRUE):There are no adverse comments about this hotel at all .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> in the Internet . </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Wherefore , the Lord God , who the Lord of the Lord shall be a good land in the land of the land , and my b b <unk> , and my father , and the c land of the land of the land of the land of the land . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible at a location nearby and costs EUR 3 <unk> per day . </s> \n",
      "\n",
      "DE:  Genießen Sie hier in gemütlicher Atmosphäre ein kühles Kölsch oder einen erfrischenden Cocktail .\n",
      "\n",
      "\t EN (TRUE):Enjoy a local beer or refreshing cocktail in a cosy atmosphere .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a relaxing meal . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This module module module is a low ##AT##-##AT## channel basis of a single channel . </s> \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great deal with a wide range of activities in the <unk> . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die Lizenzgeberin haftet auch nach den gesetzlichen Bestimmungen , sofern als Folge eines von ihr zu vertretenden Lieferverzuges der / die Lizenznehmer / in berechtigt ist , geltend zu machen , dass sein Interesse an der weiteren Vertragserfüllung in Fortfall geraten ist .\n",
      "\n",
      "\t EN (TRUE):For any discounts the amount of the bill needs to have been paid in full on the account of the licensor .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> of the <unk> / <unk> / <unk> / <unk> , which is the same as a result of the <unk> . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): &quot; The &quot; <unk> &quot; , &quot; <unk> &quot; , the <unk> ##AT##-##AT## <unk> , and the <unk> of the <unk> , and the <unk> of the <unk> , and the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the people who have been a <unk> , and a <unk> , and the <unk> <unk> , and the <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.24127255670793868\n",
      "=====================================================\n",
      "..................................................Step  37500\n",
      "Actual: The vibrant <unk> at <unk> restaurant and bar are the places to be seen for the <unk> of Cyprus . </s> \n",
      "\n",
      "Predicted: The <unk> restaurant Restaurant the Restaurant is is is a perfect and be a as a rest and the . </s> \n",
      "(Train) BLEU (500 elements):  0.38642611533568344\n",
      "..................................................Step  38000\n",
      "Actual: All serial in- and outputs are potential free . </s> \n",
      "\n",
      "Predicted: All the devices and the are available ##AT##-##AT## of </s> \n",
      "(Train) BLEU (510 elements):  0.3976426659605167\n",
      "============= Step  38000  =============\n",
      "\t Loss:  0.7044250161647797\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 And a words , and they have been spoken ; they were not cast out , and they did not not have been b <unk> . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is located in the heart of the city , in the heart of the city of <unk> , with its own <unk> and the <unk> of the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): “ <unk> <unk> ” is a <unk> <unk> <unk> , in the public areas of the city . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): apartments in Conil de la Frontera . </s> \n",
      "\n",
      "DE:  Zitate mit unterschiedlichsten stilistischen Effekten treffen aufeinander : Referenzen auf das narrative Autorenkino ( Hitchcock , Eisenstein , Godard , Brian De Palma ) , poetische oder theoretische Texte ( Tschechow , Duras , Barthes , Žižek , Weibel , Gržinić ) und Verweise auf Massenmedien – B ##AT##-##AT## Filme , TV ##AT##-##AT## Shows , Werbespots , politische Nachrichtensendungen .\n",
      "\n",
      "\t EN (TRUE):Out of all this material , mixed with disnarrative polysemy and an astonishing lack of inhibition , strange “ fictions ” are reconstructed — fragmentary fictions that are constantly interrupted .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Wann möchten Sie im Leon &apos; s Place Hotel In Rome übernachten ?\n",
      "\n",
      "\t EN (TRUE):When would you like to stay at the Leon &apos;s Place Hotel In Rome ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): When would you like to stay at the <unk> Bay Hotel <unk> Hotel Rome ? </s> \n",
      "\n",
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> is 6 <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Kosten Sie mediterrane Gerichte im preisgekrönten Restaurant Molyvos .\n",
      "\n",
      "\t EN (TRUE):Enjoy award winning Mediterranean cuisine at Molyvos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a delicious meal in the restaurant . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> , the <unk> , the <unk> ##AT##-##AT## <unk> , the <unk> ##AT##-##AT## <unk> , and <unk> , and the <unk> of <unk> and <unk> , and the <unk> . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hand Poker Poker Poker is a great starting point to the Video Poker , which is a great combination of a series of the <unk> , which is the first combination of the <unk> of the <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.2566278234166578\n",
      "=====================================================\n",
      "..................................................Step  38500\n",
      "Actual: Cheap Monday jeans developed from the idea to offer the High Fashion customer jeans which keep up of the quality with all large marks , in the price is however unbeatable . </s> \n",
      "\n",
      "Predicted: <unk> <unk> through ##AT##-##AT## by the <unk> of the the highest edge , to , has the to the quality of all the , , but the price of not , . </s> \n",
      "(Train) BLEU (420 elements):  0.41003175572784756\n",
      "..................................................Step  39000\n",
      "Actual: Tarifa is also one of the biggest wind and kitesurfing locations in Europe . </s> \n",
      "\n",
      "Predicted: This is a known of the best best and the in in Europe and </s> \n",
      "(Train) BLEU (500 elements):  0.38183303887220604\n",
      "============= Step  39000  =============\n",
      "\t Loss:  0.7311006060540676\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  &#124; Ferienwohnungen 1 Zi &#124; Ferienhäuser &#124; Landhäuser &#124; Autovermietung &#124; Last Minute Angebote ! !\n",
      "\n",
      "\t EN (TRUE):&#124; 1 Bedroom Apts &#124; Holiday houses &#124; Rural Homes &#124; Car Rental &#124; Last Minute Offers !\n",
      "\n",
      "\n",
      "\t EN (Predicted): Apartments &#124; Apartments &#124; Villas &#124; &#124; &#124; <unk> &#124; Car Rental &#124; Last Minute Offers ! </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Wherefore , the Lord God God , the Lord God , the Lord God , and the a <unk> of my people , and my father , and my father , and also the Father , and the Father of the Father , and the c <unk> of the Father , and the c <unk> of the Father , \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If you are using the client client , the workstation will be used . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): and the new <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Karibische Küche gut . Kaum bekannt - bis jetzt !\n",
      "\n",
      "\t EN (TRUE):Can get quite dodgy at night .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> 6 <unk> <unk> is the <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> and <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): this option is to be able to restart the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.25679633809735813\n",
      "=====================================================\n",
      "..................................................Step  39500\n",
      "Actual: The great location for all aspects of visiting <unk> , and lovely cocktails in the hotel bar . </s> \n",
      "\n",
      "Predicted: The staff location of the the of the the . <unk> the views . the room . . </s> \n",
      "(Train) BLEU (570 elements):  0.38609415927338275\n",
      "..................................................Step  40000\n",
      "Actual: <unk> across the Thai border into Myanmar &apos;s border towns is easy , but crossing into or out of Myanmar proper by land varies between difficult and impossible . </s> \n",
      "\n",
      "Predicted: The is the city border , the , <unk> , , also to but also the the the of the . , the , in the and the to </s> \n",
      "(Train) BLEU (430 elements):  0.39813390108325697\n",
      "============= Step  40000  =============\n",
      "\t Loss:  0.7278397084474564\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you have to see your first time in a <unk> <unk> , but you can be able to be able to be able to go to the <unk> . </s> \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located in the heart of the city of <unk> , <unk> , <unk> , <unk> and <unk> . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 <unk> , a certain rules of the rules of these Terms . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> di <unk> is a more than one language . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a very good place to explore the city centre and the underground station . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each may contain the same conditions . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located just a few metres from the hotel . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also enjoy the best of the hotel . . . </s> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the number of the number of the elements of the <unk> were made up to the <unk> <unk> , which was built in the <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.26088774006462395\n",
      "=====================================================\n",
      "..................................................Step  40500\n",
      "Actual: It is able to generate all common barcode formats ( linear , 2D and composite barcode types ) in perfect output quality . </s> \n",
      "\n",
      "Predicted: TBarCode includes available to use all the API features ( including , 2D , CANopen ) ) ) . <unk> space . . </s> \n",
      "(Train) BLEU (430 elements):  0.39286161322010904\n",
      "..................................................Step  41000\n",
      "Actual: Location was excellent for our needs - an ideal distance from the hustle and bustle of the West End and City Centre attractions . Breakfast was very good , well cooked and nicely presented . </s> \n",
      "\n",
      "Predicted: The was very and the stay . the excellent location from the hotel and bustle of the hotel . . the Centre . . </s> \n",
      "(Train) BLEU (460 elements):  0.40219530816762034\n",
      "============= Step  41000  =============\n",
      "\t Loss:  0.7083834729641676\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Der nordwestliche Teil der Insel besteht aus Granit und Gneis , von Ton überlagert , und bildet eine ca.\n",
      "\n",
      "\t EN (TRUE):A battle between Denmark and Sweden in 1645 led to Swedish control of the island , but it was brief - they left again the same year . In the Roskildepeace of 1658 Bornholm , Skaane , Halland and Blekinge were given to Sweden .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Google nimmt niemals Geld für die Einbeziehung oder das Ranking von Websites und die Schaltung in den indexbasierten Suchergebnissen ist kostenlos .\n",
      "\n",
      "\t EN (TRUE):Google never accepts money to include or rank sites in our search results , and it costs nothing to appear in our organic search results .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can be sure to be able to make the privacy or the information on the web site . </s> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good and the staff were very helpful . </s> \n",
      "\n",
      "DE:  Eine Woche später wird Dianne Feinstein , Vorstandsvorsitzende der Inspektoren , als Nachfolgerin Moscones ernannt . Sie ist die erste Bürgermeisterin der Stadt .\n",
      "\n",
      "\t EN (TRUE):Returning by the parallel Stockton or Powell will give you a better feeling of the day to day life of the residents , and are both good for those looking for imported commodities such as tea or herbs .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a week of the week , the <unk> is a <unk> , as the <unk> <unk> , the <unk> <unk> is the first time of the city . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): With the SCXI ##AT##-##AT## <unk> module , the NI USB ##AT##-##AT## <unk> is a bit channel ##AT##-##AT## channel channel . </s> \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a bit of a bit confusing . </s> \n",
      "\n",
      "DE:  Zerstören Sie alle Blöcke , um zur nächsten Ebene zu gelangen .\n",
      "\n",
      "\t EN (TRUE):Destroy all the blocks to advance to the next level .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You will find the next to the next page . </s> \n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "\t EN (TRUE):Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Bridge Hotel is a perfect place to relax . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Das Personal war immer hilfsbereit und freundlich .\n",
      "\n",
      "\t EN (TRUE):The location and helpfulness of staff was excellent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): staff were helpful and helpful . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.252434895273936\n",
      "=====================================================\n",
      "..................................................Step  41500\n",
      "Actual: Breakfast charge at 22 <unk> per person rather steep -- we did not take it as a result . </s> \n",
      "\n",
      "Predicted: The was was the : - night - than , a had not have a to a room . </s> \n",
      "(Train) BLEU (490 elements):  0.39723043032978916\n",
      "..................................................Step  42000\n",
      "Actual: Alkacon Software GmbH offers it &apos;s customers service , support and extension products for OpenCms , providing an optional layer of security and convenience often required for mission critical OpenCms installations . </s> \n",
      "\n",
      "Predicted: The GmbH GmbH GmbH GmbH easy best for , and , service support for OpenCms , and support customers team of the and security for in to OpenCms ##AT##-##AT## applications applications . </s> \n",
      "(Train) BLEU (550 elements):  0.41536599199326085\n",
      "============= Step  42000  =============\n",
      "\t Loss:  0.7086452838480473\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  &#124; Ferienwohnungen 1 Zi &#124; Ferienhäuser &#124; Landhäuser &#124; Autovermietung &#124; Last Minute Angebote ! !\n",
      "\n",
      "\t EN (TRUE):&#124; 1 Bedroom Apts &#124; Holiday houses &#124; Rural Homes &#124; Car Rental &#124; Last Minute Offers !\n",
      "\n",
      "\n",
      "\t EN (Predicted): reviews 1 Bedroom Bedroom Bedroom Bedroom Bedroom Bedroom Bedroom Apts &#124; Bedroom Bedroom Apts &#124; Last Minute Offers &#124; Last Minute Offers ! </s> \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a drink in the hotel ’ s <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> , <unk> , <unk> , and <unk> , and <unk> , and <unk> . </s> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : ~ <unk> <unk> : <unk> <unk> <unk> <unk> ; <unk> : <unk> <unk> ; <unk> ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo <unk> <unk> ; <unk> ; Volvo ; Volvo ; Volvo ; Volvo ; Volvo <unk> ; Volvo ; Volvo ; \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy the sunshine in the sun and enjoy a relaxing meal in the hotel ’ s children . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a great place to enjoy the best of the best restaurants and the best shopping area . </s> \n",
      "\n",
      "DE:  Zerstören Sie alle Blöcke , um zur nächsten Ebene zu gelangen .\n",
      "\n",
      "\t EN (TRUE):Destroy all the blocks to advance to the next level .\n",
      "\n",
      "\n",
      "\t EN (Predicted): You will need to use the next to the next page . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is the best way to get around and you can use the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Obwohl das Nazi ##AT##-##AT## Regime die Buddhistische Gemeinde in Berlin , die seit 1936 aktiv gewesen war , schloss und kurzzeitig deren Begründer Martin Steinke 1941 inhaftierte , verfolgte es die Buddhisten nicht generell .\n",
      "\n",
      "\t EN (TRUE):Although the Nazi regime closed the Buddhistische Gemeinde ( Buddhist Society ) in Berlin , which had been active from 1936 , and briefly arrested its founder Martin Steinke in 1941 , they generally did not persecute Buddhists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , the <unk> <unk> was the first time in Berlin , and the <unk> was a <unk> <unk> , and the <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> - <unk> , <unk> , <unk> and <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2477243539596674\n",
      "=====================================================\n",
      "..................................................Step  42500\n",
      "Actual: If you have any questions , issues or need technical advice , our Partner Support Team is on hand to help . </s> \n",
      "\n",
      "Predicted: If you have a questions or or or other to support , our team Support team is a the . make you </s> \n",
      "(Train) BLEU (480 elements):  0.4026045450973306\n",
      "..................................................Step  43000\n",
      "Actual: It offers comfortably and stylishly decorated rooms . </s> \n",
      "\n",
      "Predicted: The is comfortable furnished comfortable furnished rooms . </s> \n",
      "(Train) BLEU (420 elements):  0.40472535182469366\n",
      "============= Step  43000  =============\n",
      "\t Loss:  0.7102071148902178\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Ideale Lage für Exkursionen in die Stadt und Nähe zur Promenade .\n",
      "\n",
      "\t EN (TRUE):There was plenty of space in the room and a nice garden to sit and have a drink and smoke .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a beautiful and romantic atmosphere of the city of Dubrovnik , with its beautiful mountain landscape , <unk> <unk> and the <unk> Bay of the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> prices for the <unk> and the <unk> , and the <unk> of the <unk> and the <unk> of the entire territory . </s> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : ~ : 3 <unk> <unk> <unk> : <unk> <unk> ; <unk> <unk> ; <unk> <unk> ; <unk> ; Volvo ; Volvo ; Volvo : <unk> <unk> ; <unk> <unk> ; <unk> <unk> ; <unk> <unk> ; <unk> <unk> ; <unk> <unk> ; Weight : <unk> ; Volvo : <unk> ; Volvo : <unk> <unk> ; Weight : 39 . \n",
      "\n",
      "DE:  Nach einigen Wanderwochen erreichten ich und Celina Warschau . Auf dem Weg zum jüdischen Komitee begegnete ich auf der Straße meinem Bruder !\n",
      "\n",
      "\t EN (TRUE):It turned out that Marek had jumped from the window of a train moving to Majdanek .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you have to pay the <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): between the hotel and the <unk> . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Dr Goodheart , the <unk> , the <unk> , and the <unk> of the <unk> , the <unk> <unk> <unk> , which was a <unk> . </s> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): One older child or adult is charged USD 23 <unk> per night in the room . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also find a single player . </s> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): about the files are available for the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2561246190714773\n",
      "=====================================================\n",
      "..................................................Step  43500\n",
      "Actual: our view was amazing . . we had a <unk> . </s> \n",
      "\n",
      "Predicted: The staff of very and </s> \n",
      "(Train) BLEU (500 elements):  0.41102075055377324\n",
      "..................................................Step  44000\n",
      "Actual: 23 And I will multiply blessings upon him , inasmuch as he will be humble before me . </s> \n",
      "\n",
      "Predicted: 23 And I will show him unto him , and as he is be a before me . </s> \n",
      "(Train) BLEU (480 elements):  0.394408274598712\n",
      "============= Step  44000  =============\n",
      "\t Loss:  0.706727316275239\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 These a words are b ; and they did not have b <unk> , and they did not have no c <unk> . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also see the <unk> or <unk> PC and the <unk> . </s> \n",
      "\n",
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , and the <unk> <unk> , and the <unk> of the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> and the performance of the <unk> are very flexible , especially for your application or a user ##AT##-##AT## click to the user ##AT##-##AT## engine . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> is a more than one . </s> \n",
      "\n",
      "DE:  Karibische Küche gut . Kaum bekannt - bis jetzt !\n",
      "\n",
      "\t EN (TRUE):Can get quite dodgy at night .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / <unk> <unk> is a real ##AT##-##AT## time ##AT##-##AT## wide system . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located only 100 metres from the <unk> . </s> \n",
      "\n",
      "DE:  Jeder Wikitraveler kann Artikel verändern , neue Seiten erstellen und sogar Informationen über die Seite selbst überschreiben .\n",
      "\n",
      "\t EN (TRUE):Any Wikitraveller can change articles , rewrite navigation areas , even overwrite information about the site itself .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> can be visited , new sites , and forums about the page . </s> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): about the files are very useful for the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2524652444763925\n",
      "=====================================================\n",
      "..................................................Step  44500\n",
      "Actual: Use GPIB accessories to create GPIB systems for multiple system requirements and configurations . </s> \n",
      "\n",
      "Predicted: The GPIB ##AT##-##AT## is create the ##AT##-##AT## . the GPIB . . a . </s> \n",
      "(Train) BLEU (520 elements):  0.39535076983252954\n",
      "..................................................Step  45000\n",
      "Actual: Located very conveniently in Albufeira our hotel is a preferred place to stay and begin exploring the place . </s> \n",
      "\n",
      "Predicted: The in close located the , hotel is a great place to stay in a to . place to </s> \n",
      "(Train) BLEU (360 elements):  0.4072912087069814\n",
      "============= Step  45000  =============\n",
      "\t Loss:  0.7066834761351347\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 words these words are not ; and they did not not believe , and they did not only be a <unk> . </s> \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a drink in the <unk> and the <unk> . </s> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good and the location was very good . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the bed was very comfortable . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a more than more than a long ##AT##-##AT## term . </s> \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): reviews are submitted by our customers after their stay at <unk> <unk> Boutique Boutique Hotel . </s> \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Members of the <unk> <unk> , <unk> , <unk> , and <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is located only a short walk from the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> , the <unk> <unk> , the <unk> of the <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> of the <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> \n",
      "\n",
      "DE:  Einige der ursprünglichen Charakteristika des Gebäudes - wie beispielsweise die einzigartige denkmalgeschützte Fassade und die bezaubernde Innenausstattung der Bar ##AT##-##AT## Bodega De Blauwe Parde - wurden bis heute bewahrt .\n",
      "\n",
      "\t EN (TRUE):Some unchanged features include the unique frontage , which has listed building status , and also the unique interior of De Blauwe Parade bar ##AT##-##AT## bodega .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> - <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2635982415286944\n",
      "=====================================================\n",
      "..................................................Step  45500\n",
      "Actual: However it is part two that is the most striking of the new video feature . <unk> new . . . </s> \n",
      "\n",
      "Predicted: Now , has a of minutes can in <unk> of . the population . . . . . . . . </s> \n",
      "(Train) BLEU (430 elements):  0.3950577889120007\n",
      "..................................................Step  46000\n",
      "Actual: See also : Program description with screenshots . </s> \n",
      "\n",
      "Predicted: <unk> also also <unk> <unk> , <unk> . </s> \n",
      "(Train) BLEU (560 elements):  0.4018077021802364\n",
      "============= Step  46000  =============\n",
      "\t Loss:  0.7105853489786387\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  &#124; Ferienwohnungen 1 Zi &#124; Ferienhäuser &#124; Landhäuser &#124; Autovermietung &#124; Last Minute Angebote ! !\n",
      "\n",
      "\t EN (TRUE):&#124; 1 Bedroom Apts &#124; Holiday houses &#124; Rural Homes &#124; Car Rental &#124; Last Minute Offers !\n",
      "\n",
      "\n",
      "\t EN (Predicted): reviews 1 Bedroom Apts &#124; Apartments &#124; Rural Homes Apartments &#124; Last Minute Offers ! </s> \n",
      "\n",
      "DE:  In raschem Tempo werden die Modelle angepasst und erneuert .\n",
      "\n",
      "\t EN (TRUE):The models are quickly being improved and renewed .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> are used . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): is not . . . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 days of the date of the Terms of Use . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> Olympus of the global range of the global range of services are designed to meet the demands of the world &apos;s leading companies . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is a very good place to stay in the city centre . </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each can be used in terms of actions and actions . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is the best way to get to the <unk> and you can use the desired to the desired . </s> \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> , <unk> , <unk> , <unk> , <unk> ( <unk> ) , <unk> , <unk> , and <unk> , and the <unk> of <unk> , and the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> , the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): about the files are not available for the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.24141525736883043\n",
      "=====================================================\n",
      "..................................................Step  46500\n",
      "Actual: With Dr . R . <unk> , who is in charge of the measures for building and monument preservation taken by the city of Torres <unk> and the Portuguese authority for the conservation of historical monuments ( <unk> ) . </s> \n",
      "\n",
      "Predicted: <unk> the . Dr <unk> <unk> , <unk> <unk> the the of the <unk> of the , the , of to the <unk> of <unk> <unk> , <unk> <unk> <unk> of the two of the , , <unk> ) , </s> \n",
      "(Train) BLEU (560 elements):  0.41031902158916955\n",
      "..................................................Step  47000\n",
      "Actual: Official government documents are kept in English , but there over 40 distinct languages spoken in Ghana including English , <unk> , <unk> , <unk> , <unk> , and so on . </s> \n",
      "\n",
      "Predicted: The <unk> and in not in the . but it is a years <unk> . by the . a . and , <unk> , <unk> , <unk> , <unk> <unk> . the </s> \n",
      "(Train) BLEU (420 elements):  0.40110320764248075\n",
      "============= Step  47000  =============\n",
      "\t Loss:  0.7001374504417182\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  &#124; Ferienwohnungen 1 Zi &#124; Ferienhäuser &#124; Landhäuser &#124; Autovermietung &#124; Last Minute Angebote ! !\n",
      "\n",
      "\t EN (TRUE):&#124; 1 Bedroom Apts &#124; Holiday houses &#124; Rural Homes &#124; Car Rental &#124; Last Minute Offers !\n",
      "\n",
      "\n",
      "\t EN (Predicted): Apartments &#124; Apartments &#124; Camping &#124; Camping &#124; Car Rental &#124; Last Minute Offers ! </s> \n",
      "\n",
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> provides you with the <unk> <unk> , which will be used by the <unk> , which will be used to be used by the <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): is the best way to get the best . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : 0 : <unk> <unk> <unk> : <unk> <unk> ; <unk> : <unk> ; <unk> ; <unk> ; <unk> ; <unk> ; <unk> ; <unk> ; <unk> ; <unk> : <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> di <unk> is a more important role in the world . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a great choice for exploring the city and the best ##AT##-##AT## in Rome . </s> \n",
      "\n",
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> 6 <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): One older child or adult is charged USD 23 <unk> per night when using existing bedding . </s> \n",
      "\n",
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can find a new player with a single player . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hand 50 % of the Poker Video Poker is a video game : Video Poker , a number of five cards , which is the most important combination of the combination of the combination of the combination of the world . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2653691470848235\n",
      "=====================================================\n",
      "..................................................Step  47500\n",
      "Actual: Traffic is awful , pedestrians are constantly wandering into the street out of turn , and garages in the Loop can cost as much as $ 40 per day . And although downtown streets are laid out on the grid , many have multiple levels which confuse even the most hardened city driver . </s> \n",
      "\n",
      "Predicted: The was the , the , the the , the <unk> , of the . and the by the <unk> . be a a as the 25 <unk> day . </s> \n",
      "(Train) BLEU (490 elements):  0.4173270548665161\n",
      "..................................................Step  48000\n",
      "Actual: The hotel is 10 ##AT##-##AT## minute drive from Trieste Airport and near Gorizia . </s> \n",
      "\n",
      "Predicted: The hotel is located minutes minute walk from the , , the the . </s> \n",
      "(Train) BLEU (470 elements):  0.3928045641200117\n",
      "============= Step  48000  =============\n",
      "\t Loss:  0.6974713726788759\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a very quiet location in a quiet area , close to the main shopping district and the underground station . </s> \n",
      "\n",
      "DE:  In raschem Tempo werden die Modelle angepasst und erneuert .\n",
      "\n",
      "\t EN (TRUE):The models are quickly being improved and renewed .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> are used in the field . </s> \n",
      "\n",
      "DE:  Dieses 4 ##AT##-##AT## Sterne ##AT##-##AT## Landhotel aus dem 18. Jahrhundert inmitten einer ländlichen Umgebung ist nur eine kurze Fahrt vom Stadtzentrum von Londonderry und vom örtlichen Flughafen entfernt .\n",
      "\n",
      "\t EN (TRUE):This 4 ##AT##-##AT## star 18th century country house hotel is situated in the countryside , just a short drive from Derry city centre and within reach of the City of Derry Airport .\n",
      "\n",
      "\n",
      "\t EN (Predicted): This 4 ##AT##-##AT## star hotel is situated in a quiet area , just a short walk from the city centre of <unk> , and is a short walk from the airport . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the location was very good . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Olympus of the global range of the global range of the global range of the global exchange features of the global range of the <unk> Group in the field of the <unk> technology . </s> \n",
      "\n",
      "DE:  Wann möchten Sie im Leon &apos; s Place Hotel In Rome übernachten ?\n",
      "\n",
      "\t EN (TRUE):When would you like to stay at the Leon &apos;s Place Hotel In Rome ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): would you like to stay at the <unk> Hotel Place Hotel Rome ? </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): reliable , such as <unk> , <unk> , <unk> , and NI LabVIEW , and the flexibility of the NI LabVIEW graphical and <unk> can be used to increase the productivity . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): this option is very useful for the current directory . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.25987847087195726\n",
      "=====================================================\n",
      "..................................................Step  48500\n",
      "Actual: Research on megalithic graves and a fortified settlement ( Monte da Ponte ) in South Portugal . </s> \n",
      "\n",
      "Predicted: <unk> of the and and <unk> <unk> <unk> ( <unk> da <unk> ) , the Tyrol , </s> \n",
      "(Train) BLEU (620 elements):  0.41611564988868316\n",
      "..................................................Step  49000\n",
      "Actual: Authors such Norman Davies , Geert <unk> and Tony <unk> &#91; 5 &#93; stand for this strong need to see and understand how everything was connected on this small territory , this promontory of the Eurasian double continent . </s> \n",
      "\n",
      "Predicted: &#91; &#91; as <unk> , and <unk> , <unk> <unk> , <unk> &#93; , ##AT##-##AT## this <unk> <unk> to be the the the to is to to the site , . but is , the <unk> <unk> <unk> of </s> \n",
      "(Train) BLEU (460 elements):  0.4080076930424287\n",
      "============= Step  49000  =============\n",
      "\t Loss:  0.7081936461925507\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 words they are not ; and they are not ; and they are not a <unk> . </s> \n",
      "\n",
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> provides the following instructions to the kernel , which will be used to be used with the <unk> . </s> \n",
      "\n",
      "DE:  Private Parkplätze stehen für EUR 3,50 pro Tag in der Nähe zur Verfügung .\n",
      "\n",
      "\t EN (TRUE):Private parking is possible at a location nearby and costs EUR 3.50 per day .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Private parking is possible at a location nearby and costs EUR 3 <unk> per day . </s> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : ~ : 3 <unk> ; Volvo : <unk> ; <unk> : <unk> ; <unk> ; <unk> ; ; ; ; ; Volvo ; ; Volvo : : <unk> ; Weight : <unk> ; Weight : 39 <unk> <unk> ; Weight : 39 <unk> <unk> ; Weight : 00 : 40 <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Olympus of the global exchange of the global exchange of the global exchange market is the most important and innovative methods of the world . </s> \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good and the staff were very helpful . </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each conditions are required to be defined and actions . </s> \n",
      "\n",
      "DE:  With a unique location in the heart of Peneda / Gerês National Park , this Pousada has a breathking view over the river Cávado and the peaceful Caniçada dam .\n",
      "\n",
      "\t EN (TRUE):Located in the heart of Peneda ##AT##-##AT## Gerês National Park , this guest house boasts panoramic views of the surrounding mountains and is a welcome retreat for nature enthusiasts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> in the <unk> of <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , and <unk> , and the <unk> of <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2627473418730679\n",
      "=====================================================\n",
      "..................................................Step  49500\n",
      "Actual: This air ##AT##-##AT## conditioned beach hotel includes a total of 240 rooms over 8 floors . </s> \n",
      "\n",
      "Predicted: The modern ##AT##-##AT## conditioned hotel offers comprises a total of 8 rooms spread 8 floors . </s> \n",
      "(Train) BLEU (400 elements):  0.3993733727156755\n",
      "..................................................Step  50000\n",
      "Actual: This advice is even more important for intrepid travelers to the outer boroughs , where the street patterns are irregular . </s> \n",
      "\n",
      "Predicted: The is is not though than , the the . get city country , and you <unk> is are not . </s> \n",
      "(Train) BLEU (450 elements):  0.40682522746389105\n",
      "============= Step  50000  =============\n",
      "\t Loss:  0.7052038141191006\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Zum klimatisierten Hotel gehören auch ein Whirpool und eine traumhafte Sonnenterrasse .\n",
      "\n",
      "\t EN (TRUE):Apart from this , the guests can enjoy the facility of an independent air ##AT##-##AT## conditioning system , a jacuzzi and a beautiful sun terrace .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The hotel is also a great place to stay . </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Now , the Lord God , the Lord God , the Lord shall be a <unk> , and my a b b <unk> , and my father , and the Father , the Lord , the Lord , the Lord , and the c <unk> of the earth , and the c <unk> of the earth , and the \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Niedrigere Preise durch mehr Wettbewerb . Die Kosten für Kapital können durch Währungsstabilität , niedrigere Zinssätze und eine bessere Organisation der Kapitalmärkte gesenkt werden .\n",
      "\n",
      "\t EN (TRUE):In a knowledge ##AT##-##AT## based society the opportunity of education is the key to progress and equality and sustainability .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , and <unk> , and the <unk> of the <unk> . </s> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): : Trek : <unk> : <unk> <unk> ; <unk> : <unk> ; <unk> ; 2 ; ; Volvo ; ; ; Volvo ; Volvo ; ; Volvo : : : ) ; The <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): three <unk> <unk> - <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Nachfolgend sehen Sie die Gästebewertungen von Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\t EN (TRUE):The guest reviews are submitted by our customers after their stay at Meliá Fernán González Boutique hotel .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The guest reviews are submitted by our customers after their stay at Meliá <unk> Boutique Hotel . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  With a unique location in the heart of Peneda / Gerês National Park , this Pousada has a breathking view over the river Cávado and the peaceful Caniçada dam .\n",
      "\n",
      "\t EN (TRUE):Located in the heart of Peneda ##AT##-##AT## Gerês National Park , this guest house boasts panoramic views of the surrounding mountains and is a welcome retreat for nature enthusiasts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be able to do the <unk> <unk> , for the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.25453727615039456\n",
      "=====================================================\n",
      "..................................................Step  50500\n",
      "Actual: If you stay in the studio or in a double / twin room we offer 1 bottle for 5 to 8 days and for stays of up to 14 days 2 bottles of <unk> red wine . </s> \n",
      "\n",
      "Predicted: If you are in the studio double double a double bed twin room , offer you to of a days a days of a a of 5 to 5 days and and and the and and and </s> \n",
      "(Train) BLEU (490 elements):  0.41654408287215244\n",
      "..................................................Step  51000\n",
      "Actual: Traditional inn offering you regional Slovenian dishes and a magical gastronomic experience . </s> \n",
      "\n",
      "Predicted: The <unk> <unk> a delicious dishes cuisine . meals delicious light . . </s> \n",
      "(Train) BLEU (490 elements):  0.41404082984570734\n",
      "============= Step  51000  =============\n",
      "\t Loss:  0.7075041453242302\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you have to find your first time in the <unk> <unk> , but you can find the <unk> <unk> <unk> , but you can find the <unk> <unk> or <unk> <unk> . </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Now , the Lord God , who will not believe the a land of Zion , and that they might be b , and my b b father , and my father , and my father , and the c <unk> of the land of the earth , and the c <unk> of the earth , and the c \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Apartments in Paris , Spain . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): will be sent to the Flash Player <unk> ! </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a very good place to stay in the morning . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Bei der Installation von Adobe Presenter 6 wird das ältere Programm Breeze Presenter 5.1 deinstalliert .\n",
      "\n",
      "\t EN (TRUE):Installing Adobe Presenter 6 will uninstall the earlier Breeze Presenter 5.1 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> is the <unk> <unk> <unk> <unk> <unk> 5 <unk> . </s> \n",
      "\n",
      "DE:  Tux Racer wird Ihnen helfen , die Zeit totzuschlagen und sie können OpenOffice zum Arbeiten verwenden .\n",
      "\n",
      "\t EN (TRUE):Tux Racer will help you pass the time while you wait , and you can use OpenOffice for work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> will be able to assist the time time to enable the time to the desired time . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our Classic Rooms are elegantly decorated with a modern style and a shower , which is a modern hotel with modern amenities . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> of the <unk> , and his wife , and his wife , and the <unk> , and the <unk> <unk> , and the <unk> <unk> , and the <unk> <unk> <unk> . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.273354594664667\n",
      "=====================================================\n",
      "..................................................Step  51500\n",
      "Actual: But this benign trend has barely touched the Roma . </s> \n",
      "\n",
      "Predicted: But this trend is is been been the Roma of </s> \n",
      "(Train) BLEU (510 elements):  0.39754818590095975\n",
      "..................................................Step  52000\n",
      "Actual: Thus , for a system with two pulleys , the force needed is halved , but the so is the height of displacement . </s> \n",
      "\n",
      "Predicted: The , the the two of the <unk> , the <unk> of to the . to the <unk> . the <unk> of the . </s> \n",
      "(Train) BLEU (390 elements):  0.4029793806698635\n",
      "============= Step  52000  =============\n",
      "\t Loss:  0.7001449852138758\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  In der Hotelbeschreibung im Internet müßte die Zufahrt beschrieben werden .\n",
      "\n",
      "\t EN (TRUE):There are no adverse comments about this hotel at all .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Internet connection is the right to the <unk> . </s> \n",
      "\n",
      "DE:  Dieser bietet doppelten Schutz durch den OnExecution Scan , der Programme noch bevor Sie gestartet werden mit dem Signaturenscanner überprüft , sowie dem Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\t EN (TRUE):It includes the double protection using the OnExecution Scan , which scans programs right before they are started with the signature scanner , as well as the Malware ##AT##-##AT## IDS .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> provides the results of the kernel , which will be used by the <unk> , which will be used by the <unk> . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The apartment is located in the <unk> <unk> , in the heart of the <unk> district . </s> \n",
      "\n",
      "DE:  Eine Woche später wird Dianne Feinstein , Vorstandsvorsitzende der Inspektoren , als Nachfolgerin Moscones ernannt . Sie ist die erste Bürgermeisterin der Stadt .\n",
      "\n",
      "\t EN (TRUE):Returning by the parallel Stockton or Powell will give you a better feeling of the day to day life of the residents , and are both good for those looking for imported commodities such as tea or herbs .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the SCXI module module is based on a channel ##AT##-##AT## channel basis , which can be used to a single channel ##AT##-##AT## up modules , which is a high ##AT##-##AT## performance module for the <unk> . </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): between the hotel and the staff were very friendly and helpful . </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each can be used in terms of the property and conditions . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> <unk> , <unk> <unk> , <unk> <unk> ( <unk> ) , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hand 50 % of Video Poker Video Poker : the <unk> card is a five star camera , which is a <unk> combination of the most important memory cards . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2620137711406343\n",
      "=====================================================\n",
      "..................................................Step  52500\n",
      "Actual: Surrounded by banks and shops , the hotel is also very close to the lake and is one of the most modern hotels in town . </s> \n",
      "\n",
      "Predicted: The by shops , shops , the hotel is located close close to the lake and the surrounded of the most important hotels in the . </s> \n",
      "(Train) BLEU (500 elements):  0.41251575002786367\n",
      "..................................................Step  53000\n",
      "Actual: Set up the DLNA Media Server so that it can be used by the PS3 ™ system . </s> \n",
      "\n",
      "Predicted: <unk> in a <unk> server Server , that you can be used to the PS3 ™ system . </s> \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Train) BLEU (580 elements):  0.40057145666680943\n",
      "============= Step  53000  =============\n",
      "\t Loss:  0.6960566946268082\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ® , QuarkXPress ® , and ® <unk> , <unk> ® , and <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 18 For behold , he , and he <unk> , and the a <unk> , and the <unk> , and the people , and the people of men , for they are b hardened their souls , for they are <unk> , and they did not suppose them to be <unk> . </s> \n",
      "\n",
      "DE:  Leicht und ergonomisch gebaut , mit einer Hand zu bedienen , stellen diese Messgeräte eine wirtschaftliche Lösung dar , wenn bei Verdacht auf Wanddickenverlust schnell geprüft werden soll .\n",
      "\n",
      "\t EN (TRUE):Lightweight and ergonomically designed for easy one ##AT##-##AT## hand operation , these gages provide cost ##AT##-##AT## effective measurement solutions in many applications that require quick inspection of materials suspected of metal wall thinning .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> , a <unk> , a <unk> , a <unk> <unk> <unk> , and if you have to be done in the case of the <unk> . </s> \n",
      "\n",
      "DE:  Wie hilfreich finden Sie die Demo ##AT##-##AT## CD ?\n",
      "\n",
      "\t EN (TRUE):How helpful do you find the demo CD ##AT##-##AT## ROM ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): How do you can see the CD ##AT##-##AT## ROM ? </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): offers the opportunity to learn more about the <unk> of the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> \n",
      "\n",
      "DE:  Mitglieder geniessen viele zus � tzliche Leistungen wie optimierter Sicherheit , schnelleren Auszahlungszeiten und der Aufhebung von Kreditkarteneinzahlungslimits .\n",
      "\n",
      "\t EN (TRUE):Members enjoy a range of perks including enhanced security and protection , faster withdrawals and increased credit card deposit limits .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Members of the <unk> <unk> , <unk> , <unk> , and <unk> , and the <unk> of <unk> . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Softwaretools wie zum Beispiel der NI Analog Waveform Editor , das NI Modulation Toolkit und LabVIEW helfen Anwendern , die Entwicklungszeit von Prüfsystemen zu verringern und gleichzeitig flexibel auf die sich ändernden Anwendungsanforderungen zu reagieren .\n",
      "\n",
      "\t EN (TRUE):Software tools such as the NI Analog Waveform Editor , Modulation Toolkit and LabVIEW , help reduce your test system development time while also having the flexibility to meet your changing application requirements .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , and NI LabVIEW software , and the new <unk> <unk> , and the <unk> <unk> , and the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Es gibt in der Nähe kein Stadtzentrum , in dem man abends beruhigt spazieren gehen könnte . Zu Fuß braucht man in das Zentrum Bournemouths 25 min .\n",
      "\n",
      "\t EN (TRUE):Also , the possibility of a small corner play area for kids in restuarant so that adults can eat in peace and with peace of mind .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.26411805452224296\n",
      "=====================================================\n",
      "..................................................Step  53500\n",
      "Actual: We here at Costasur offer a new kind of psychological treatment , using a different way of communicating : psychology online . </s> \n",
      "\n",
      "Predicted: Our have have the and a great and of the and and and the <unk> <unk> of the . and , and </s> \n",
      "(Train) BLEU (480 elements):  0.40404176396248365\n",
      "..................................................Step  54000\n",
      "Actual: In October 2008 our own cosmetic , beauty and wellness center , including a plastic surgeon clinic , will be opened . </s> \n",
      "\n",
      "Predicted: In October , , <unk> <unk> , the and wellness centre of the a fitness for for and the be a for </s> \n",
      "(Train) BLEU (440 elements):  0.4042665859123828\n",
      "============= Step  54000  =============\n",
      "\t Loss:  0.7001708901375532\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ® ® ® , Mac OS X ® , and <unk> ® , and <unk> ® , <unk> ® , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Alle unterstützten Barcode Varianten sind in einem einzigen Interface konfigurierbar .\n",
      "\n",
      "\t EN (TRUE):All supported bar code formats are configurable through one single interface .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All barcode languages are available in a single interface . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Im Allgemeinen basieren sie auf Datenbanken , Templates und Skripts .\n",
      "\n",
      "\t EN (TRUE):In general they are based on databases , template and scripts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): they are based on databases , and scripts . </s> \n",
      "\n",
      "DE:  bietet ihnen die Möglichkeit , alte ABAP ##AT##-##AT## Reports mit samt ihrer betriebswirtschaftlichen Intelligenz trotz des Umstiegs auf die MS ##AT##-##AT## Umgebung weiter zu nutzen .\n",
      "\n",
      "\t EN (TRUE):Uses the BW extractor API to extract data from productive R / 3 systems by using delta mechanisms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): offers the opportunity to learn more about the <unk> of the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Wann möchten Sie im Leon &apos; s Place Hotel In Rome übernachten ?\n",
      "\n",
      "\t EN (TRUE):When would you like to stay at the Leon &apos;s Place Hotel In Rome ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): When you would you like to stay at the <unk> &apos;s Place Hotel Rome in Rome ? </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each can be used to be used . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Royal Gate Hotel is located just 100 metres from the new <unk> Museum . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also enjoy the best of the <unk> . . . </s> \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.27114733018326187\n",
      "=====================================================\n",
      "..................................................Step  54500\n",
      "Actual: Returns the number of rows , as an integer . </s> \n",
      "\n",
      "Predicted: Returns the number of integer as as a integer . </s> \n",
      "(Train) BLEU (460 elements):  0.40529191581331264\n",
      "..................................................Step  55000\n",
      "Actual: Other acts are harmful : a punch with an arm , or the extension of an arm , arms , armies ; a word that hurts , or the extension of bad ##AT##-##AT## <unk> , propaganda . </s> \n",
      "\n",
      "Predicted: In violence violence often : <unk> person with a arm of with a person of a arm , with , or , a <unk> , God God with a word of God a God , or , </s> \n",
      "(Train) BLEU (570 elements):  0.40384585227627434\n",
      "============= Step  55000  =============\n",
      "\t Loss:  0.7048137780278921\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Je mehr Zeit wir mit Gilad und dem Rest des Teams in Israel verbracht haben ( um nicht den lauten Hahn zu erwähnen der schreiend bei denen über den Campus rennt ) desto überzeugter waren wir – zusammen können wir mehr bewegen .\n",
      "\n",
      "\t EN (TRUE):The more time we spent with Gilad as well as the rest of the team in Israel ( not to mention the very loud rooster that runs around in their campus ) , the more convinced we all became - we ’ ll be better off together .\n",
      "\n",
      "\n",
      "\t EN (Predicted): we have been able to share the teams of the teams in the Netherlands and the <unk> of the <unk> ( <unk> ) , and the <unk> <unk> <unk> <unk> , we were able to be able to be able to be able to be able to be able to be able to be able to be able to be \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 For behold , he , and he <unk> , and the <unk> , and the <unk> , who are not the only man , but not to save them for their soul , for they should be b <unk> for the people of men , and they did not prosper . </s> \n",
      "\n",
      "DE:  Residenz City Lodge befindet sich am mandelförmigen Sweelinckplein im Herzen des schicken Duinoord ##AT##-##AT## Viertels in Den Haag .\n",
      "\n",
      "\t EN (TRUE):In the midst of the bustling city life , an oasis of peace and luxury can be found bordering the beautiful Haagsche Park , across from the main train station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 5 ##AT##-##AT## minute walk from the <unk> <unk> , the <unk> <unk> Lodge is located in the heart of the city . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the location was very good . </s> \n",
      "\n",
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> SCXI module provides a high ##AT##-##AT## speed channel ##AT##-##AT## to ##AT##-##AT## date , which can be used to be integrated into a single channel . </s> \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): and the hotel was very good . </s> \n",
      "\n",
      "DE:  Naturreservat auf aufgeschüttetem Gelände am Río de la Plata .\n",
      "\n",
      "\t EN (TRUE):Wide selection of main courses including fresh pasta in homemade sauces ( $ 15 ##AT##-##AT## 30AR ) , traditional chicken dishes incuding Chicken Marsala ( $ 20AR- $ 30AR ) , and a variety of meats including Argentine parilla style steaks ( $ 35AR ) . The menu of seafood is worth considering with rareties such as fresh Yellow ##AT##-##AT## fin Tuna steak in a pesto sauce ( $ 30AR ) .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Das Cleddau Bridge Hotel ist der ideale Platz um zu entspannen oder geschäftlich zu reisen .\n",
      "\n",
      "\t EN (TRUE):Cleddau Bridge hotel is the ideal place for those who want a relaxing holiday or who travel for business .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Bridge Hotel is a perfect place to relax . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Bei den romanischen Völkern paart sich die effektive Ohnmacht mit lächerlicher Anmaßung .\n",
      "\n",
      "\t EN (TRUE):To material weakness the Latin countries add a quite fantastic pretentiousness .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.249245459732604\n",
      "=====================================================\n",
      "..................................................Step  55500\n",
      "Actual: The hotel has a variety of rooms , including a full selection of rear ##AT##-##AT## facing quiet rooms in which guests can choose to relax in pure comfort . </s> \n",
      "\n",
      "Predicted: The hotel offers a large of rooms , including a wide range of rooms in based rooms rooms , the the can enjoy from the in the comfort . </s> \n",
      "(Train) BLEU (530 elements):  0.40570875652141325\n",
      "..................................................Step  56000\n",
      "Actual: If we give permits for ten journals , we shall ourselves found thirty , and so on in the same proportion . </s> \n",
      "\n",
      "Predicted: If we are the the the years , we will have to in of and we we the the same way of </s> \n",
      "(Train) BLEU (430 elements):  0.40535020557787677\n",
      "============= Step  56000  =============\n",
      "\t Loss:  0.703575308829546\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will find the first time in a <unk> <unk> , but you can imagine , but you can now be able to contact the <unk> <unk> or <unk> <unk> . </s> \n",
      "\n",
      "DE:  Man schließt die Gitarre über Mikrofon oder Pickup an die PC Soundkarte an und schon kann es losgehen .\n",
      "\n",
      "\t EN (TRUE):You connect the guitar via microphone or pickup with the PC soundcard and you are ready !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also use the <unk> and <unk> , and it can be used . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): is a great reason for me . . . </s> \n",
      "\n",
      "DE:  Ferienwohnungen erste Strandlinie . Dachwohnung in Conil de la Frontera , Cadiz .\n",
      "\n",
      "\t EN (TRUE):Located at the foot of the beach , this Conil beach apartment rentals , Spain is perfect for your summer vacation in Conil de la Frontera .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Apartments in Conil . </s> \n",
      "\n",
      "DE:  Genießen Sie das ganze Jahr über die Sonne und erfrischen Sie sich im Außenpool , während Ihre Kinder sicher in ihren eigenen Schwimmbecken spielen .\n",
      "\n",
      "\t EN (TRUE):Soak up the year ##AT##-##AT## round sunshine as you enjoy a dip in one of the outdoor swimming pools , as children play safely in their own pools .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> and the <unk> , the <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , and the first time of the <unk> , but that the <unk> of the <unk> was a <unk> <unk> . </s> \n",
      "\n",
      "DE:  Ein älteres Kind oder Erwachsener zahlt USD 23,40 pro Übernachtung in einem der vorhandenen Betten .\n",
      "\n",
      "\t EN (TRUE):One older child or adult is charged USD 23.40 per night when using existing bedding .\n",
      "\n",
      "\n",
      "\t EN (Predicted): One older child or adult is charged USD 23 <unk> per night when using existing bedding . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Classic Deluxe Rooms are decorated with a spacious room with a view of the sea , and the <unk> is a modern hotel with a view of the Castle . </s> \n",
      "\n",
      "DE:  William Gross beschreibt die Bedeutung des Manuskripts für die Sammlung der Familie Gross .\n",
      "\n",
      "\t EN (TRUE):William Gross describes the significance of the manuscript to the Gross Family Collection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): William <unk> , the <unk> of the <unk> of the family family . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.27551265795394797\n",
      "=====================================================\n",
      "..................................................Step  56500\n",
      "Actual: Nevertheless , the end result is surprisingly similar : support of the national sovereignty of their own people , not only in a general , constitutional sense , but also as the basis for exercising nationalistic demands . </s> \n",
      "\n",
      "Predicted: The , the <unk> of is the : to to , the German authorities , the own , , but only in the sense sense but but as but as the a basis of the . . . </s> \n",
      "(Train) BLEU (510 elements):  0.4151519592617037\n",
      "..................................................Step  57000\n",
      "Actual: The Standard Service Program ( SSP ) can be purchased for individual NI software packages , and provides Standard Service for a software license for one year . </s> \n",
      "\n",
      "Predicted: <unk> <unk> Service for can SSP ) is be used for a purposes ##AT##-##AT## and and and offers a Service for a year for . the year . </s> \n",
      "(Train) BLEU (520 elements):  0.415442258874772\n",
      "============= Step  57000  =============\n",
      "\t Loss:  0.7022611808031798\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  34 Diese a Worte sind wahr und treu ; darum übertretet sie nicht , und b nehmt auch nichts davon weg .\n",
      "\n",
      "\t EN (TRUE):34 These sayings are a true and faithful ; wherefore , transgress them not , neither b take therefrom .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 34 These words are faithful ; and they are not faithful , and they are not a good . </s> \n",
      "\n",
      "DE:  Alle unterstützten Barcode Varianten sind in einem einzigen Interface konfigurierbar .\n",
      "\n",
      "\t EN (TRUE):All supported bar code formats are configurable through one single interface .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All barcode languages are included in a single interface . </s> \n",
      "\n",
      "DE:  Quiet and clean room ( on the 4th floor ) with the view on the Dome .\n",
      "\n",
      "\t EN (TRUE):And it is value for money .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very good . </s> \n",
      "\n",
      "DE:  Genießen Sie hier in gemütlicher Atmosphäre ein kühles Kölsch oder einen erfrischenden Cocktail .\n",
      "\n",
      "\t EN (TRUE):Enjoy a local beer or refreshing cocktail in a cosy atmosphere .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a relaxing drink or a cocktail cocktail . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): “ <unk> ” is a more than more than one . </s> \n",
      "\n",
      "DE:  Baustelle zwischen See und Hotel . Altmodische Einrichtung .\n",
      "\n",
      "\t EN (TRUE):Shared lobby with campsite next door , apparently , and hotel check in / out were not handled by lobby staff but by restaurant staff .\n",
      "\n",
      "\n",
      "\t EN (Predicted): between the hotel and the <unk> . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode TBarCode / <unk> is a real ##AT##-##AT## time ##AT##-##AT## box . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  Einst verwunschene Eilande , später Schlupfwinkel von Piraten , welche die goldbeladenen Schiffe der Spanier überfielen , sind diese unwirtlichen Inseln mit dem seltsamen Tierleben heute wohl eines der letzten großen Tierparadiese der Welt .\n",
      "\n",
      "\t EN (TRUE):Apart from its beautiful beaches and unique and varied ecosystems , the Galapagos Islands are home to towering active volcanoes that reach altitudes up to 1,600 meters .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> <unk> <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Die Musikant entspricht dem Folkrock . Dennoch finden sich in den Liedern viele musikalische Elemente aus klassisch- folklorischer Liedern aus Anatolien bis zum Mittelmeer , aus Latein- amerikanischen Märschen bis hin zu klassischen Rockklängen .\n",
      "\n",
      "\t EN (TRUE):Yorum continues to sing hopeful songs in the name of all the world &apos;s revolutionary music .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2807900920816775\n",
      "=====================================================\n",
      "..................................................Step  57500\n",
      "Actual: 7 ##AT##-##AT## 8 , p . 1 ) . We are asking that the check of <unk> ’ educational materials is done with the participation of experts , independent interpreters specializing in Hebrew ( non ##AT##-##AT## Jews ) , using the excerpts from the mentioned texts of “ Talmud ” and “ <unk> <unk> ” that were cited earlier within \n",
      "\n",
      "Predicted: The And of , we 3 , <unk> , </s> \n",
      "(Train) BLEU (460 elements):  0.4170007937459878\n",
      "..................................................Step  58000\n",
      "Actual: We had a great bedroom , large by London standards and has a good bathroom . We also loved the front sitting room , it was a place where you can have tea and read in the afternoon . </s> \n",
      "\n",
      "Predicted: The had a very location and but and the and , the been nice location . </s> \n",
      "(Train) BLEU (570 elements):  0.41215307732110207\n",
      "============= Step  58000  =============\n",
      "\t Loss:  0.6865043690502644\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Ideale Lage für Exkursionen in die Stadt und Nähe zur Promenade .\n",
      "\n",
      "\t EN (TRUE):There was plenty of space in the room and a nice garden to sit and have a drink and smoke .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the hotel was very friendly and helpful . </s> \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a <unk> <unk> <unk> , which is a great place to enjoy the best of the <unk> Valley , and the <unk> <unk> is a great place to explore the delights of the <unk> Bay and the <unk> . </s> \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Our apartments are located in the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the location was very good . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western <unk> Hotell , <unk> , Sweden - 29 Guest reviews . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Im Fall Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) beteiligte sich die Mehrheit an einer umfangreichen Kritik an Flook und entschied , dass dieses Gericht irrt � mlicherweise � verschiedene gesetzliche Vorkehrungen , die begrifflich ohne Zusammenhang seien � , vermischt h � tte . Id . , unter 959 , 201 USPQ at 360 .\n",
      "\n",
      "\t EN (TRUE):In In re Bergy , 596 F.2d 952 , 201 USPQ 352 ( CCPA 1979 ) , the majority engaged in an extensive critique ofFlook , concluding that this Court had erroneously commingled � distinct statutory provisions which are conceptually unrelated . � Id . , at 959 , 201 USPQ at 360 .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> <unk> , <unk> <unk> , <unk> <unk> ( <unk> <unk> ) , <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  in dieser Option ermöglicht , Dateien relativ zum aktuellen Verzeichnis einzubinden .\n",
      "\n",
      "\t EN (TRUE):in the include path allows for relative includes as it means the current directory . However , it is more efficient to explicitly use include &apos; . / file &apos; than having PHP always check the current directory for every include .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can use the files of the current current directory . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(Test) BLEU (100 elements):  0.2720175336017809\n",
      "=====================================================\n",
      "..................................................Step  58500\n",
      "Actual: If you ’ ve been wondering whether you should make the move to Windows Vista , take a look at the evidence . </s> \n",
      "\n",
      "Predicted: If you are re already a whether you have be sure same to the , , where a look at home time of </s> \n",
      "(Train) BLEU (540 elements):  0.41540923556076387\n",
      "..................................................Step  59000\n",
      "Actual: For instance , a course may make use of many resources and have , as an aid to instructors , a wiki devoted to equipment located in several remote classrooms . </s> \n",
      "\n",
      "Predicted: The example , the <unk> of be a of the other . other to and well example . the ##AT##-##AT## and <unk> , to the . in the ways areas . </s> \n",
      "(Train) BLEU (530 elements):  0.40673129020430665\n",
      "============= Step  59000  =============\n",
      "\t Loss:  0.6946328013837337\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a perfect location for a business trip , a short distance from the city centre and the underground station . </s> \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 For behold , he <unk> , and the a <unk> of the priesthood , and the b <unk> , and the people of men , for the people of their soul , for they might be b judged , for they might be a <unk> unto them , and they did not receive them . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  shower was ok but leaked needed updating .\n",
      "\n",
      "\t EN (TRUE):the response to to requests was poor , phone 3 time for milk in the room over 4 hours .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the room was very comfortable and the bathroom was very comfortable . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): three <unk> <unk> - <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> . </s> \n",
      "\n",
      "DE:  Jedes Stück Information kann eigene Eigenschaften und Aktionen besitzen .\n",
      "\n",
      "\t EN (TRUE):Every bit of information and code can be given their own properties and actions .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Each can be used to be used . </s> \n",
      "\n",
      "DE:  Alle älteren Kinder oder Erwachsene zahlen EUR 32,00 pro Übernachtung und Person für Zustellbetten .\n",
      "\n",
      "\t EN (TRUE):All older children or adults are charged EUR 32.00 per night and person for extra beds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): All older children or adults are charged EUR 32 <unk> per night and person for extra beds . </s> \n",
      "\n",
      "DE:  &quot; Die Letzte Droge &quot; wird , wie auch Route 66 , unter einer Creative Commons ##AT##-##AT## Lizenz veröffentlicht - Kopieren , Aufführen und Verändern ist diesmal auch zu kommerziellen Zwecken gestattet und erwünscht !\n",
      "\n",
      "\t EN (TRUE):We will release The Last Drug under a Creative Commons BY SA License , making it the first free HD feature film . All footage , project files , sounds and special effects will be available for those of you that are eager to get hands on experience on the first Open Source feature film project ever or for those that are able to turn it into something different .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the &quot; <unk> &quot; , the <unk> , the <unk> ##AT##-##AT## <unk> ##AT##-##AT## <unk> , <unk> , and <unk> , and also the <unk> . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hand 50 % of the Poker Video Poker Video Poker is a <unk> of the five ##AT##-##AT## player card , which is a five star camera , which is a <unk> of the <unk> , which is a great combination of the most important ones . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2686560517426889\n",
      "=====================================================\n",
      "..................................................Step  59500\n",
      "Actual: However , if the EU allows software patents , then that &apos;s the beginning of the end for Linux . </s> \n",
      "\n",
      "Predicted: If , the the EU is you , , the the the the end of the Linux of the . </s> \n",
      "(Train) BLEU (480 elements):  0.40788629219035377\n",
      "..................................................Step  60000\n",
      "Actual: Here at the <unk> Hotel we like to make our guests feel welcome and provide a friendly atmosphere for them to relax in . </s> \n",
      "\n",
      "Predicted: If is a cost <unk> , offer a explore a stay a a to enjoy a variety atmosphere . your . make . the </s> \n",
      "(Train) BLEU (530 elements):  0.4090073001595578\n",
      "============= Step  60000  =============\n",
      "\t Loss:  0.7058896887153387\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  In der Hotelbeschreibung im Internet müßte die Zufahrt beschrieben werden .\n",
      "\n",
      "\t EN (TRUE):There are no adverse comments about this hotel at all .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Internet connection is the right to the <unk> . </s> \n",
      "\n",
      "DE:  In dem traditionellen Fischerdorf werden ausländische Gäste sehr herzlich empfangen . Seien Sie allerdings gewarnt vor dem Zustand der Strasse und fahren Sie vorsichtig !\n",
      "\n",
      "\t EN (TRUE):It &apos;s a small traditional fishing village , with friendly locals , always very welcoming to British tourists .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy a drink in the <unk> <unk> . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Dieses 4 ##AT##-##AT## Sterne ##AT##-##AT## Landhotel aus dem 18. Jahrhundert inmitten einer ländlichen Umgebung ist nur eine kurze Fahrt vom Stadtzentrum von Londonderry und vom örtlichen Flughafen entfernt .\n",
      "\n",
      "\t EN (TRUE):This 4 ##AT##-##AT## star 18th century country house hotel is situated in the countryside , just a short drive from Derry city centre and within reach of the City of Derry Airport .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a 4 ##AT##-##AT## star hotel , this 4 ##AT##-##AT## star hotel is situated in a quiet area of the city centre , just a short drive from the city centre and the airport . </s> \n",
      "\n",
      "DE:  Im Allgemeinen basieren sie auf Datenbanken , Templates und Skripts .\n",
      "\n",
      "\t EN (TRUE):In general they are based on databases , template and scripts .\n",
      "\n",
      "\n",
      "\t EN (Predicted): they are based on databases , and scripts . </s> \n",
      "\n",
      "DE:  aufgerufen wird , fügt Sie die Flash Nachricht &quot; Eintrag gespeichert !\n",
      "\n",
      "\t EN (TRUE):is called , it adds the flash message &quot; Record Saved !\n",
      "\n",
      "\n",
      "\t EN (Predicted): you want to download the Flash section ! </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is located in the <unk> <unk> and the very convenient location , close to the underground and underground stations . </s> \n",
      "\n",
      "DE:  Wünschen Sie Unterstützung bei der der Zentrensuche ?\n",
      "\n",
      "\t EN (TRUE):Would you like being assisted in searching a specialised centre ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> support ? </s> \n",
      "\n",
      "DE:  Kosten Sie mediterrane Gerichte im preisgekrönten Restaurant Molyvos .\n",
      "\n",
      "\t EN (TRUE):Enjoy award winning Mediterranean cuisine at Molyvos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy the delicious cuisine in the restaurant . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our Deluxe Rooms are decorated with a modern style with shower and a shower , with a view of the Castle . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> of the <unk> , and his wife , and his own life is also a great place for the whole day . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.26131170917657454\n",
      "=====================================================\n",
      "..................................................Step  60500\n",
      "Actual: The hotel is ideal located if you like to bike , walk , or drive a car . </s> \n",
      "\n",
      "Predicted: The hotel is located for in you are to make or or or or the or day park </s> \n",
      "(Train) BLEU (560 elements):  0.42030351110893066\n",
      "..................................................Step  61000\n",
      "Actual: <unk> de <unk> is a small town in the province of Huesca in the Pyrenees in Spain that has . . . </s> \n",
      "\n",
      "Predicted: <unk> de <unk> is a small village in the province of the . the province . the . is a </s> \n",
      "(Train) BLEU (620 elements):  0.3985403571691975\n",
      "============= Step  61000  =============\n",
      "\t Loss:  0.6890458387583495\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Das Hotel Sempione verfügt über eine ideale , ruhige Lage in einem geschäftigen Viertel mit guter Verkehrsanbindung . Der Bahnhof und eine U ##AT##-##AT## Bahnstation liegen in der Nähe .\n",
      "\n",
      "\t EN (TRUE):Hotel Sempione welcomes you to a busy yet quiet area of Milan , within walking distance of excellent transport links , including the central railway station and the Repubblica metro station .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The <unk> Hotel is a perfect location for a business trip to the city centre . </s> \n",
      "\n",
      "DE:  In raschem Tempo werden die Modelle angepasst und erneuert .\n",
      "\n",
      "\t EN (TRUE):The models are quickly being improved and renewed .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> will be used . </s> \n",
      "\n",
      "DE:  Leicht und ergonomisch gebaut , mit einer Hand zu bedienen , stellen diese Messgeräte eine wirtschaftliche Lösung dar , wenn bei Verdacht auf Wanddickenverlust schnell geprüft werden soll .\n",
      "\n",
      "\t EN (TRUE):Lightweight and ergonomically designed for easy one ##AT##-##AT## hand operation , these gages provide cost ##AT##-##AT## effective measurement solutions in many applications that require quick inspection of materials suspected of metal wall thinning .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> to a <unk> , a <unk> to make this a solution to make a good way to be done . </s> \n",
      "\n",
      "DE:  15. einem Dritten bei dem Verstoss gegen eine dieser Regeln zu helfen .\n",
      "\n",
      "\t EN (TRUE):15. assist any third party in engaging in any activity prohibited by these Terms .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 15 days , the police against the patent protection . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Standort war sehr praktisch . In 5 Minuten ist man am Hauptbahnhof , in 10 Minuten im Bankenviertel .\n",
      "\n",
      "\t EN (TRUE):very central only a few minutes walk from Bohr / Ryanair bus stop and main train station.Generally cheap and cheerful .\n",
      "\n",
      "\n",
      "\t EN (Predicted): and the hotel was very good . </s> \n",
      "\n",
      "DE:  Wünschen Sie Unterstützung bei der der Zentrensuche ?\n",
      "\n",
      "\t EN (TRUE):Would you like being assisted in searching a specialised centre ?\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> support support ? </s> \n",
      "\n",
      "DE:  Kosten Sie mediterrane Gerichte im preisgekrönten Restaurant Molyvos .\n",
      "\n",
      "\t EN (TRUE):Enjoy award winning Mediterranean cuisine at Molyvos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can enjoy Mediterranean Mediterranean cuisine in the restaurant . </s> \n",
      "\n",
      "DE:  Bei einer digitalen Bildkette wird das Intensitätssignal für jedes Pixel ohne analoge Zwischenschritte direkt in der Detektoreinheit digitalisiert , d.h. in Zahlen umgewandelt .\n",
      "\n",
      "\t EN (TRUE):A digital image chain is an image chain that is equipped with a digital detector instead of an analogue one .\n",
      "\n",
      "\n",
      "\t EN (Predicted): a <unk> <unk> <unk> is not suitable for any of the <unk> <unk> , in the <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  William Gross beschreibt die Bedeutung des Manuskripts für die Sammlung der Familie Gross .\n",
      "\n",
      "\t EN (TRUE):William Gross describes the significance of the manuscript to the Gross Family Collection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): William <unk> , the <unk> of the family of the family family . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2744976063810137\n",
      "=====================================================\n",
      "..................................................Step  61500\n",
      "Actual: The hotel features the largest conference centre in Naples , with 25 meeting rooms and a maximum capacity of 3500 . </s> \n",
      "\n",
      "Predicted: The hotel has a largest conference hall in Naples . with 25 meeting rooms . up capacity capacity of people people </s> \n",
      "(Train) BLEU (550 elements):  0.4083864365066136\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "..................................................Step  62000\n",
      "Actual: And he said unto them : On this wise shall ye baptize ; and there shall be b no <unk> among you . </s> \n",
      "\n",
      "Predicted: And he said unto them : I this shall , ye shall , and there shall be no none more among you . </s> \n",
      "(Train) BLEU (430 elements):  0.4254064557454336\n",
      "============= Step  62000  =============\n",
      "\t Loss:  0.6981558171659707\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  In der Hotelbeschreibung im Internet müßte die Zufahrt beschrieben werden .\n",
      "\n",
      "\t EN (TRUE):There are no adverse comments about this hotel at all .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Internet connection is the <unk> . </s> \n",
      "\n",
      "DE:  18 Denn siehe , er richtet , und sein Richterspruch ist gerecht ; und das Kleinkind , das im Kindesalter stirbt , geht nicht zugrunde ; aber die Menschen trinken Verdammnis für ihre eigene Seele , außer sie demütigen sich und a werden so wie kleine Kinder und glauben daran , daß die Errettung im b sühnenden Blut Christi , des Herrn , des Allmächtigen , und durch dasselbe war und ist und sein wird .\n",
      "\n",
      "\t EN (TRUE):18 For behold he judgeth , and his judgment is just ; and the infant perisheth not that dieth in his infancy ; but men drink a damnation to their own souls except they humble themselves and b become as little children , and believe that c salvation was , and is , and is to come , in and through the d atoning blood of Christ , the Lord Omnipotent .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 18 For behold , he shall be a <unk> , and he shall be b cut , and the b priesthood , and the b <unk> , and the people of men , for they may be b scattered for their souls , and they shall be b judged unto them , and they shall be b judged . </s> \n",
      "\n",
      "DE:  Das ist viel einfacher ... Nein , streiten Sie nicht mit mir ... es ist einfacher ... ach , wie auch immer !\n",
      "\n",
      "\t EN (TRUE):This is far more easy ... no , don &apos;t argue with me ... it is easier ... ah whatever !\n",
      "\n",
      "\n",
      "\t EN (Predicted): is a little more . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): secure and secure performance , and the optimum tools are able to make your preferred account to make your account or click in a Content Provider . </s> \n",
      "\n",
      "DE:  Die drei GewinnerInnen jeder Kategorie - insgesamt 12 SchülerInnen in Begleitung ihrer koordinierenden Lehrperson - werden zur &quot; Energie ist unsere Zukunft &quot; Preisverleihung nach Brüssel eingeladen .\n",
      "\n",
      "\t EN (TRUE):The top three winners of each category , a total of 12 , together with their coordinating teachers , will be rewarded with a trip to Brussels to attend the “ Energy is our Future ” Awards ceremony .\n",
      "\n",
      "\n",
      "\t EN (Predicted): three <unk> <unk> - <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , \n",
      "\n",
      "DE:  Slimline ICE ist in einer Vielzahl von Geschmacksrichtungen sowohl als Eis am Stiel als auch im Becher erhältlich .\n",
      "\n",
      "\t EN (TRUE):Palatinose ™ is a disaccharide derived from beet sugar .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> .com is a great deal with a variety of food and a selection of food . </s> \n",
      "\n",
      "DE:  Auch ist , so denkt Dr. Gutherz , bereits die erste Seite sehr viel versprechend , da sie eine Definition des klinischen Psychotrauma ##AT##-##AT## Begriffes enthält , der er gänzlich zustimmen kann .\n",
      "\n",
      "\t EN (TRUE):At the rhetorical climax of this summary , Dr Goodheart comes across some sentences expressed with great pathos .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Dr Goodheart was a <unk> <unk> , but also a <unk> of the <unk> of <unk> . </s> \n",
      "\n",
      "DE:  So pendelt der nächtliche Sucher dann zwischen dem Antiquariat am Kollwitzplatz in Berlin und dem in Brighton , zwischen Vancouver und Adelaide / Australien hin und her .\n",
      "\n",
      "\t EN (TRUE):And so the nocturnal searcher shuttles back and forth between the antiquarian bookshop on Kollwitzplatz in Berlin and one in Brighton , between Vancouver and Adelaide in Australia .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can find a little small but , but it is possible to be able to do . </s> \n",
      "\n",
      "DE:  William Gross beschreibt die Bedeutung des Manuskripts für die Sammlung der Familie Gross .\n",
      "\n",
      "\t EN (TRUE):William Gross describes the significance of the manuscript to the Gross Family Collection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): William <unk> , the <unk> of the family of the family family . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.27435214821661263\n",
      "=====================================================\n",
      "..................................................Step  62500\n",
      "Actual: Private dining from the 24 ##AT##-##AT## hour room service menu is also available . </s> \n",
      "\n",
      "Predicted: The parking room the hotel ##AT##-##AT## hour reception service . . available available . </s> \n",
      "(Train) BLEU (500 elements):  0.40875687654783366\n",
      "..................................................Step  63000\n",
      "Actual: In the USA , Sir <unk> &apos;s miniature will also be available directly from the Days of Wonder booth at various conventions throughout the summer . </s> \n",
      "\n",
      "Predicted: In the USA , the <unk> was <unk> also be be reached in on the Days of Wonder . in the times . the summer months </s> \n",
      "(Train) BLEU (580 elements):  0.40752164314937206\n",
      "============= Step  63000  =============\n",
      "\t Loss:  0.6940771932452917\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Mag sein , dass du deine ersten Gehversuche in einem rostigen , undichten Kahn beginnst - aber mit der Zeit wirst du dich zum schnittigen Speedboat oder edlen Katamaran vorarbeiten .\n",
      "\n",
      "\t EN (TRUE):You may be starting in a ramshackle old tub of a boat , but in no time at all you &apos;ll be able to buy a fancy speedboat , or a classy catamaran . Turn your newfound fame into money , and spend it to buy lavish new homes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you will be able to find your first time in the <unk> <unk> , but you can still be able to get a little bit of the <unk> <unk> or <unk> . </s> \n",
      "\n",
      "DE:  1 Nun ließ der Herr , Gott , die Hungersnot im Land Ur so schwer werden , daß a Haran , mein Bruder , starb ; aber b Terach , mein Vater , lebte noch im Land Ur der Chaldäer .\n",
      "\n",
      "\t EN (TRUE):1 Now the Lord God caused the a famine to wax sore in the land of Ur , insomuch that b Haran , my brother , died ; but c Terah , my father , yet lived in the land of Ur , of the Chaldees .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 1 Now , the Lord God God , the Lord God , the Lord shall be a <unk> in the land of God , and my b father , and my father , and my father , in the land of the land , and the c <unk> of the land of the Lord , and the c <unk> of \n",
      "\n",
      "DE:  Unsere kürzlich renovierten Ferienwohnungen zur Selbstversorgung in Obertraun sind weniger als eine Gehminute vom Ufer des Hallstätter Sees entfernt .\n",
      "\n",
      "\t EN (TRUE):Enjoy a warm and friendly welcome at the Obertrauner Hof , located at the heart of the tranquil village of Obertraun in the Salzkammergut , a delightful 10 ##AT##-##AT## minute walk from the lakeside .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Our apartments are located in the <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die schlanke , einfache Oberfläche und die gute Performance machen es zum idealen Werkzeug , um dein Netbook ( oder normales Notebook ) in einen e ##AT##-##AT## Book Reader zu verwandeln .\n",
      "\n",
      "\t EN (TRUE):Its low resource use , simple interface and fast performance makes it the ideal tool to turn your netbook ( or regular laptop ) into an e ##AT##-##AT## book reader .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , and the optimum performance of the application makes it easy to use the task to make your account or or a user agent . </s> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Da jedes SCXI ##AT##-##AT## Modul die Signale auf einen einzigen Kanal des Datenerfassungsmoduls multiplext , lassen sich problemlos weitere Module hinzufügen , was für eine höhere Kanalanzahl sorgt .\n",
      "\n",
      "\t EN (TRUE):It can multiplex its signals into a single channel of the DAQ device , and you can add modules to increase channel count .\n",
      "\n",
      "\n",
      "\t EN (Predicted): With the SCXI ##AT##-##AT## <unk> module , the NI <unk> ##AT##-##AT## <unk> is a single channel ##AT##-##AT## channel , which can be used for a single ##AT##-##AT## channel module . </s> \n",
      "\n",
      "DE:  Die Bewohner des Nordens sind ein buntes Völkergemisch aus den verschiedensten Bergstämmen und den Nord ##AT##-##AT## Thais oder kon mueang ; die traditionell in den fruchtbaren Tiefebenen Nordthailands siedeln . In vielerlei Hinsicht halten sich die Nord Thais für die &quot; wahren &quot; Thais , die die Thai ##AT##-##AT## Kultur noch am besten über die Zeit gerettet haben .\n",
      "\n",
      "\t EN (TRUE):From Pratu Chiang Mai market , songthaews also travel to Hang Dong ( 20 baht ) and San Patong , south ##AT##-##AT## west of Chiang Mai .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> , the <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Dazu kam die deutsche Beteiligung an AWACS ##AT##-##AT## Flügen .\n",
      "\n",
      "\t EN (TRUE):Additionally , the Germans participated in AWACS flights .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the <unk> of <unk> ##AT##-##AT## <unk> . </s> \n",
      "\n",
      "DE:  Das Athens Gate Hotel liegt unterhalb der Akropolis nur 100 m vom neuen Akropolis ##AT##-##AT## Museum entfernt .\n",
      "\n",
      "\t EN (TRUE):The Athens Gate Hotel rests under the Acropolis , just 100 metres from the new Acropolis museum .\n",
      "\n",
      "\n",
      "\t EN (Predicted): 5 minutes from the city centre , the hotel is just 100 metres from the Acropolis . </s> \n",
      "\n",
      "DE:  Zimmerbeschreibung : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\t EN (TRUE):Room Notes : Our Castle Deluxe Rooms are traditionally themed with rich luxurious fabrics and furnishings , many with excellent views over the Castle grounds .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Room Notes : Our Deluxe Deluxe Rooms are decorated with a contemporary style with the comfort of the hotel , with a view of the sea , the hotel ’ s modern hotel with modern comforts . </s> \n",
      "\n",
      "DE:  Ziel von 50 ##AT##-##AT## Hand Video Poker ist ähnlich zu dem von Video Poker : eine Pokerhand mit fünf Karten , die mindestens die niedrigste Kombination von dem Spieltisch , an dem Sie sich gerade befinden , zu erlangen .\n",
      "\n",
      "\t EN (TRUE):The object of 50 ##AT##-##AT## Hand Video Poker is similar to Video Poker , to obtain a five ##AT##-##AT## card poker hand that contains at least the lowest combination on the pay table for the version you are playing .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Hand 50 % Hand Video Poker Video Poker Video Poker : a five ##AT##-##AT## minute card , which is a five star camera , which is a new combination of the latest technology . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2730707863546631\n",
      "=====================================================\n",
      "..................................................Step  63500\n",
      "Actual: Are you looking for a backpack , an army bag or a sea bag ? </s> \n",
      "\n",
      "Predicted: Do you a a a new or or existing or or a <unk> or or </s> \n",
      "(Train) BLEU (410 elements):  0.4050265630331335\n",
      "..................................................Step  64000\n",
      "Actual: he estado muy <unk> , es <unk> y agradable . la piscina está muy bien , aunque no la <unk> <unk> por el tiempo . </s> \n",
      "\n",
      "Predicted: The was a <unk> <unk> <unk> muy , <unk> <unk> </s> \n",
      "(Train) BLEU (450 elements):  0.4138473095399372\n",
      "============= Step  64000  =============\n",
      "\t Loss:  0.69049369430542\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ® , <unk> ® ® , <unk> ® , and <unk> ® , and the <unk> ® ® , and the <unk> ® <unk> ® , and the <unk> ® <unk> ® , and the <unk> ® of the <unk> ® <unk> ® , and the <unk> ® <unk> ® <unk> ® <unk> ® <unk> <unk> ® <unk> <unk> \n",
      "\n",
      "DE:  Das Hotel Opera befindet sich in der Nähe des Royal Theatre , Kongens Nytorv , &apos; Stroget &apos; und Nyhavn .\n",
      "\n",
      "\t EN (TRUE):Hotel Opera is situated near The Royal Theatre , Kongens Nytorv , &quot; Strøget &quot; and fascinating Nyhavn .\n",
      "\n",
      "\n",
      "\t EN (Predicted): The Hotel is located in the heart of the city , <unk> , <unk> , <unk> and <unk> . </s> \n",
      "\n",
      "DE:  Es existieren Busverbindungen in nahezu jeden Ort der Provence ( eventuell mit Umsteigen in Aix ##AT##-##AT## en ##AT##-##AT## Provence ) , allerdings sollte beachtet werden , dass die letzten Busse abends ca. um 19 Uhr fahren .\n",
      "\n",
      "\t EN (TRUE):As always in France those highways are expensive but practical , comfortable and fast .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ( <unk> ) , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n",
      "DE:  Länge : 11,28m ; Breite : 3,66m ; Tiefgang : 0,30m ; Bj.2006 ; Liegeplatz : River Dart , Großbritannien ; 2 Motor ( en ) ; Volvo D4 260hp ; Description : The Bavaria Sport is a really impressive boat ...\n",
      "\n",
      "\t EN (TRUE):Length : 11.40m ( ~ 37.40 ft ) ; Beam : 3.68m ; Draft : 0.90m ; built 2005 ; Location : Orsera Nautika / Kroatien ##AT##-##AT## Vrsar , Croatia ( Hrvatska ) ; 2 Engine / manufac . ; Volvo Penta 5,7 GXI ; 478kW ; 430 Engine Hours ; Weight : 6.800kg ; Neues Raymarine C70 , verlängerte Badeplattform mit Staufächern , Kühlschr ...\n",
      "\n",
      "\n",
      "\t EN (Predicted): 7 : <unk> ; 12 : 0 <unk> ; Draft : 0 <unk> ; Draft : 0 <unk> ; Draft : <unk> ; Draft ; Weight ; ; ; ; ; ; ; ; ; ; Volvo : <unk> ; Weight : 39 <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Die Prüfgeräte von Olympus erweitern den Bereich des menschlichen Auges bei der industriellen Sichtprüfung . Mit unseren Industrieendoskopen werden verdeckte Bereiche mit beschränktem Zugang sichtbar gemacht , wie z.\n",
      "\n",
      "\t EN (TRUE):Olympus test equipment expands the range of the human eye in industrial visual inspection .\n",
      "\n",
      "\n",
      "\t EN (Predicted): the Olympus of the Olympus of the <unk> of the global exchange of the global exchange of the global exchange development of the global exchange development of the company is based on the global exchange rate . </s> \n",
      "\n",
      "DE:  Das Haus liegt in der CCZ ##AT##-##AT## Umweltzone und bietet eine sehr gute Anbindung an das Bus- und U ##AT##-##AT## Bahnnetz .\n",
      "\n",
      "\t EN (TRUE):Set inside the central London congestion ##AT##-##AT## charging zone , this modern hotel has superb transport links , with access to the Tube and the bus network practically on the doorstep .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> is located in the <unk> <unk> and the central location , close to the underground and underground stations . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / TBarCode is a real ##AT##-##AT## time ##AT##-##AT## box . </s> \n",
      "\n",
      "DE:  Die Lizenzgeberin haftet auch nach den gesetzlichen Bestimmungen , sofern als Folge eines von ihr zu vertretenden Lieferverzuges der / die Lizenznehmer / in berechtigt ist , geltend zu machen , dass sein Interesse an der weiteren Vertragserfüllung in Fortfall geraten ist .\n",
      "\n",
      "\t EN (TRUE):For any discounts the amount of the bill needs to have been paid in full on the account of the licensor .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> , the <unk> , and the <unk> of the <unk> / <unk> / <unk> / <unk> / <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> , <unk> \n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DE:  Es handelt sich um ein ziemlich einfaches Protokoll ; TFTP macht aber manchmal Probleme .\n",
      "\n",
      "\t EN (TRUE):This is a fairly simple protocol , but sometimes there are problems trying to get it to work .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you need to make a single ##AT##-##AT## course protocol . </s> \n",
      "\n",
      "DE:  Bamberg , die &quot; Traumstadt der Deutschen &quot; , seine aufgeschlossenen Menschen und seine romantische Umgebung wird auch Sie begeistern , denn sie bietet für jeden etwas .\n",
      "\n",
      "\t EN (TRUE):The beauty and rich cultural life of this town can be enjoyed at any time of year . Soak up the summer sun whilst relaxing at one of the many sidewalk cafés in the historic old town or savour a cool beer beneath a shady chestnut tree in one of the popular beer gardens .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> , the <unk> of the <unk> , and his wife , and his wife , you will find the best of the best possible . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.2718733447908611\n",
      "=====================================================\n",
      "..................................................Step  64500\n",
      "Actual: - The Galerie Nationale du <unk> de <unk> , a beautiful museum of contemporary art located in the northwest corner of the Tuileries Gardens . </s> \n",
      "\n",
      "Predicted: The the hotel <unk> the <unk> is <unk> is the hotel <unk> , the architecture . in the heart of of the city . . </s> \n",
      "(Train) BLEU (510 elements):  0.4186838645696531\n",
      "..................................................Step  65000\n",
      "Actual: Benjamin David Goodman , &#91; 1 &#93; ( May 30 , 1909 – June 13 , 1986 ) was an American jazz musician , <unk> and <unk> , known as &quot; King of Swing &quot; , &quot; Patriarch of the <unk> &quot; , &quot; The Professor &quot; , and &quot; Swing &apos;s Senior <unk> &quot; . </s> \n",
      "\n",
      "Predicted: <unk> Sisko ( ( <unk> 31 &#93; , <unk> ) , 2006 , 13 13 , 2008 , , a <unk> actor ( , and , <unk> . and as a <unk> &quot; the &quot; . &quot; <unk> &quot; the &quot; &quot; . &quot; <unk> &quot; &quot; , &quot; &quot; <unk> &quot; &quot; &quot; &quot; . </s> \n",
      "(Train) BLEU (490 elements):  0.4083298046223199\n",
      "============= Step  65000  =============\n",
      "\t Loss:  0.6894480544924736\n",
      "=====================================================\n",
      "(Test) Translating test sentences ...\n",
      "Processing test data ... \n",
      "DE:  Heute verstehen sich QuarkXPress ® 8 , Photoshop ® und Illustrator ® besser als jemals zuvor . Dank HTML und CSS ­ können Anwender von QuarkXPress inzwischen alle Medien bedienen , und das unabhängig von Anwendungen der Adobe ® Creative Suite ® wie Adobe Flash ® ( SWF ) und Adobe Dreamweaver ® .\n",
      "\n",
      "\t EN (TRUE):Today , QuarkXPress ® 8 has tighter integration with Photoshop ® and Illustrator ® than ever before , and through standards like HTML and CSS , QuarkXPress users can publish across media both independently and alongside Adobe ® Creative Suite ® applications like Adobe Flash ® ( SWF ) and Adobe Dreamweaver ® .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> ® , and the <unk> ® ® ® , and the <unk> ® ® tab , and the <unk> ® <unk> ® , and the <unk> ® <unk> ® , and the <unk> ® of the <unk> ® , and the <unk> ® of the <unk> ® ® tab , the <unk> ® ® tab , the <unk> ® \n",
      "\n",
      "DE:  Tarbet Gast ist Haus im ersten Nationalpark von Schottland aufgestellt und hat eine gehobene Position hoch über dem Dorf von Tarbet und genießt spektakuläre südliche Blicke Bucht Lomond hinunter und nach der westlichen Seite von Ben Lomond .\n",
      "\n",
      "\t EN (TRUE):Tarbet Guest House is situated In Scotland ’ s first National Park and has an elevated position high above the village of Tarbet and enjoys spectacular southerly views down Loch Lomond and towards the western side of Ben Lomond .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> is a beautiful <unk> ##AT##-##AT## <unk> <unk> , which has a great climate of the village of <unk> and the <unk> <unk> , and the picturesque bay of the Bay of <unk> , and the <unk> <unk> . </s> \n",
      "\n",
      "DE:  „ Für uns junge slowenische Architekten ist prägend , wie Plečnik den öffentlichen Raum in Ljubljana zu gliedern verstand .\n",
      "\n",
      "\t EN (TRUE):“ For us young Slovene architects the way in which Plečnik was able to shape public space in Ljubljana is highly influential .\n",
      "\n",
      "\n",
      "\t EN (Predicted): <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> . </s> \n",
      "\n",
      "DE:  Wenn eine Speicherung der Daten auf dem Client erfolgen soll , werden Cookys verwendet .\n",
      "\n",
      "\t EN (TRUE):When client data storage is needed , cookies are used .\n",
      "\n",
      "\n",
      "\t EN (Predicted): If you want to use the client client , you will be used to be used . </s> \n",
      "\n",
      "DE:  Das „ Ladino di Fassa “ ist jedoch mehr als ein Dialekt – es ist eine richtige Sprache .\n",
      "\n",
      "\t EN (TRUE):This is Ladin from Fassa which is more than a dialect : it is a language in its own right .\n",
      "\n",
      "\n",
      "\t EN (Predicted): “ <unk> ” is a more than more than one . </s> \n",
      "\n",
      "DE:  Booking.com : Best Western Hotell SöderH , Söderhamn , Schweden - 29 Gästebewertungen .\n",
      "\n",
      "\t EN (TRUE):Booking.com : Best Western Hotell SöderH , Söderhamn , Sweden - 29 Guest reviews .\n",
      "\n",
      "\n",
      "\t EN (Predicted): Booking .com : Best Western Hotell <unk> , <unk> , Sweden - 29 Guest reviews . </s> \n",
      "\n",
      "DE:  Zusätzlich enthält TBarCode / SAPwin eine Menge neuer Strichcode ##AT##-##AT## Symbologien .\n",
      "\n",
      "\t EN (TRUE):In addition TBarCode / SAPwin comes with a bunch of new bar code symbologies .\n",
      "\n",
      "\n",
      "\t EN (Predicted): TBarCode / <unk> is a real ##AT##-##AT## time ##AT##-##AT## box . </s> \n",
      "\n",
      "DE:  Das ist eine Metapher , wird jemand von der Propagandaabteilung entgegnen .\n",
      "\n",
      "\t EN (TRUE):It &apos;s only a metaphor , people from the propaganda department will say .\n",
      "\n",
      "\n",
      "\t EN (Predicted): this is one of the most important <unk> . </s> \n",
      "\n",
      "DE:  Sie können hier auch Kanufahren , Windsurfen und Tauchen ...\n",
      "\n",
      "\t EN (TRUE):Here , you can also practice aquatic sports such as yachting , windsurfing and canoeing ... you will find all kinds of water channels , from wild brooks to serene lakes .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can also enjoy the diving and windsurfing . . . </s> \n",
      "\n",
      "DE:  Es gibt in der Nähe kein Stadtzentrum , in dem man abends beruhigt spazieren gehen könnte . Zu Fuß braucht man in das Zentrum Bournemouths 25 min .\n",
      "\n",
      "\t EN (TRUE):Also , the possibility of a small corner play area for kids in restuarant so that adults can eat in peace and with peace of mind .\n",
      "\n",
      "\n",
      "\t EN (Predicted): you can &apos;t get a taxi to the airport . </s> \n",
      "\n",
      "(Test) BLEU (100 elements):  0.28438873866281383\n",
      "=====================================================\n",
      "................."
     ]
    }
   ],
   "source": [
    "# Training and test BLEU scores\n",
    "attn_train_bleu_scores_over_time,attn_test_bleu_scores_over_time = [],[]\n",
    "# Loss over time\n",
    "loss_over_time = []\n",
    "\n",
    "# Labels and predictions required to calculate the BLEU scores\n",
    "# for both train and test data\n",
    "train_bleu_refs, train_bleu_cands = [],[]\n",
    "test_bleu_refs, test_bleu_cands = [],[]\n",
    "\n",
    "# Training and test BLEU scores\n",
    "num_steps = 100001\n",
    "avg_loss = 0\n",
    "\n",
    "# Defining data generators for encoder/decoder and training/testing\n",
    "enc_data_generator, dec_data_generator, \\\n",
    "test_enc_data_generator, test_dec_data_generator = \\\n",
    "define_data_generators(batch_size, enc_num_unrollings, dec_num_unrollings)\n",
    "\n",
    "print('Started Training')\n",
    "\n",
    "for step in range(num_steps):\n",
    "\n",
    "    # input (encoder) unrolling length: 40\n",
    "    # output (decoder) unrolling length: 60\n",
    "    if (step+1)%10==0:\n",
    "        print('.',end='')\n",
    "\n",
    "    # Sample a random batch of IDs from training data\n",
    "    sent_ids = np.random.randint(low=0,high=train_inputs.shape[0],size=(batch_size))\n",
    "    \n",
    "    # Getting an unrolled set of data batches for the encoder\n",
    "    eu_data, eu_labels, _ = enc_data_generator.unroll_batches(sent_ids=sent_ids)\n",
    "    \n",
    "    # Getting an unrolled set of data batches for the decoder\n",
    "    du_data, du_labels, _ = dec_data_generator.unroll_batches(sent_ids=sent_ids)\n",
    "    \n",
    "    # Train for single step\n",
    "    l, tr_pred = train_single_step(eu_data, du_data, du_labels)\n",
    "    \n",
    "    # We don't calculate BLEU scores all the time as this is expensive, \n",
    "    # it slows down the code\n",
    "    if np.random.random()<0.1:\n",
    "        \n",
    "        # all_labels are labels obtained by concatinating all the labels in batches\n",
    "        all_labels = np.argmax(np.concatenate(du_labels,axis=0),axis=1)\n",
    "        # all_preds are predictions for all unrolled steps\n",
    "        all_preds = np.argmax(tr_pred,axis=1)\n",
    "        \n",
    "        # Get training BLEU candidates and references\n",
    "        batch_cands, batch_refs = create_bleu_ref_candidate_lists(all_preds, all_labels)\n",
    "        \n",
    "        # Accumulate training candidates/references for calculating\n",
    "        # BLEU later\n",
    "        train_bleu_refs.extend(batch_refs)\n",
    "        train_bleu_cands.extend(batch_cands)\n",
    "\n",
    "    if (step+1)%500==0:  \n",
    "        \n",
    "        # Writing actual and predicte data to train_prediction.txt file for some random sentence\n",
    "        print('Step ',step+1)\n",
    "        with open(os.path.join(log_dir, train_prediction_text_fname),'a') as fa:                                \n",
    "            fa.write('============= Step ' +  str(step+1) + ' =============\\n') \n",
    "        \n",
    "        rand_idx = np.random.randint(low=1,high=batch_size)\n",
    "        print_and_save_train_predictions(du_labels, tr_pred, rand_idx, train_prediction_text_fname)        \n",
    "        \n",
    "        # Calculating the BLEU score for the accumulated candidates/references\n",
    "        bscore = 0.0\n",
    "        bscore = corpus_bleu(train_bleu_refs,train_bleu_cands,smoothing_function=nltk.translate.bleu_score.SmoothingFunction().method4)\n",
    "        attn_train_bleu_scores_over_time.append(bscore)\n",
    "        print('(Train) BLEU (%d elements): '%(len(train_bleu_refs)),bscore)\n",
    "        \n",
    "        # Reset the candidate/reference accumulators\n",
    "        train_bleu_refs, train_bleu_cands = [],[]\n",
    "        \n",
    "        # Write BLEU score to file\n",
    "        with open(log_dir + os.sep +'blue_scores_attn.txt','a') as fa_bleu:\n",
    "            fa_bleu.write(str(step+1) +','+str(bscore)+'\\n')\n",
    "        \n",
    "        with open(os.path.join(log_dir, train_prediction_text_fname),'a') as fa:                \n",
    "            fa.write('(Train) BLEU: %.5f\\n'%bscore)        \n",
    "        \n",
    "    avg_loss += l # Update average loss\n",
    "    \n",
    "    sess.run(reset_train_state) # resetting hidden state for each batch\n",
    "    \n",
    "    # ============================= TEST PHASE ==================================\n",
    "    if (step+1)%1000==0:\n",
    "        \n",
    "        # calculate average loss\n",
    "        print('============= Step ', str(step+1), ' =============')\n",
    "        print('\\t Loss: ',avg_loss/1000.0)\n",
    "        loss_over_time.append(avg_loss/1000.0)\n",
    "        \n",
    "        # write losses to file\n",
    "        with open(log_dir + os.sep + 'losses_attn.txt','a') as fa_loss:\n",
    "            fa_loss.write(str(step+1) +','+str(avg_loss/1000.0)+'\\n')\n",
    "        \n",
    "        with open(os.path.join(log_dir, train_prediction_text_fname),'a') as fa:                                \n",
    "            fa.write('============= Step ' +  str(step+1) + ' =============\\n') \n",
    "            fa.write('\\t Loss: %.5f\\n'%(avg_loss/1000.0))\n",
    "            \n",
    "        avg_loss = 0.0\n",
    "        \n",
    "        # Increase gstep to decay learning rate\n",
    "        sess.run(inc_gstep)\n",
    "        \n",
    "        # reset global step when we change the optimizer\n",
    "        if (step+1)==20000: \n",
    "            sess.run(reset_gstep)\n",
    "        \n",
    "        print('=====================================================')\n",
    "        print('(Test) Translating test sentences ...')\n",
    "        \n",
    "\n",
    "        print('Processing test data ... ')\n",
    "        \n",
    "        # ===================================================================================\n",
    "        # Predictions for Test data\n",
    "        for in_i in range(test_inputs.shape[0]//batch_size):\n",
    "            \n",
    "            # Generate encoder / decoder data for testing data\n",
    "            test_eu_data, test_eu_labels, _ = test_enc_data_generator.unroll_batches(sent_ids=np.arange(in_i*batch_size,(in_i+1)*batch_size))\n",
    "            test_du_data, test_du_labels, _ = test_dec_data_generator.unroll_batches(sent_ids=np.arange(in_i*batch_size,(in_i+1)*batch_size))\n",
    "            \n",
    "            # fill the feed dict\n",
    "            feed_dict = {}\n",
    "            for ui,(dat,lbl) in enumerate(zip(test_eu_data,test_eu_labels)):            \n",
    "                feed_dict[enc_test_input[ui]] = dat             \n",
    "\n",
    "            # Get predictions out with decoder          \n",
    "            # run prediction calculation this returns a list of prediction dec_num_unrollings long\n",
    "            test_pred_unrolled = sess.run(test_predictions, feed_dict=feed_dict)\n",
    "            \n",
    "            # We print a randomly selected sample from each batch\n",
    "            test_rand_idx = np.random.randint(0,batch_size) # used for printing test output\n",
    "            \n",
    "            print_and_save_test_predictions(test_du_labels, test_pred_unrolled, in_i, test_rand_idx, test_prediction_text_fname)\n",
    "            \n",
    "            # Things required to calculate test BLEU score\n",
    "            all_labels = np.argmax(np.concatenate(test_du_labels,axis=0),axis=1)\n",
    "            all_preds = np.concatenate(test_pred_unrolled, axis=0)\n",
    "            batch_cands, batch_refs = create_bleu_ref_candidate_lists(all_preds, all_labels)\n",
    "            test_bleu_refs.extend(batch_refs)\n",
    "            test_bleu_cands.extend(batch_cands)\n",
    "            \n",
    "            # Reset the test state\n",
    "            sess.run(reset_test_state)\n",
    "        \n",
    "        # Calculate test BLEU score\n",
    "        test_bleu_score = 0.0\n",
    "        test_bleu_score = corpus_bleu(test_bleu_refs,test_bleu_cands,\n",
    "                                      smoothing_function=nltk.translate.bleu_score.SmoothingFunction().method4)\n",
    "        attn_test_bleu_scores_over_time.append(test_bleu_score)\n",
    "        print('(Test) BLEU (%d elements): '%(len(test_bleu_refs)),test_bleu_score)\n",
    "        \n",
    "        test_bleu_refs, test_bleu_cands = [],[]        \n",
    "        print('=====================================================')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Visualizing the Attention Model\n",
    "\n",
    "Here we visualize the attention matrix for various translations the NMT system produced. The attention matrix is a `dec_num_unrollings x enc_num_unrollings` matrix. Where each cell denotes the $\\alpha$ values obtained during attention calculation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "source_labels = []\n",
    "target_labels = []\n",
    "\n",
    "print('=====================================================')\n",
    "print('(Test) Translating test sentences ...')\n",
    "\n",
    "print('Processing test data ... ')\n",
    "\n",
    "# Process each test input by batches\n",
    "for in_i in range(test_inputs.shape[0]//batch_size):\n",
    "    \n",
    "    # Generate test data\n",
    "    test_eu_data, test_eu_labels, _ = test_enc_data_generator.unroll_batches(sent_ids=np.arange(in_i*batch_size,(in_i+1)*batch_size))\n",
    "    test_du_data, test_du_labels, _ = test_dec_data_generator.unroll_batches(sent_ids=np.arange(in_i*batch_size,(in_i+1)*batch_size))\n",
    "\n",
    "    # Choose a random data point in the batch\n",
    "    test_rand_idx = np.random.randint(0,batch_size) # used for printing test output\n",
    "\n",
    "    # fill the feed dict\n",
    "    feed_dict = {}\n",
    "    source_labels = [] # This contains the source words of the test point considered\n",
    "    for ui,(dat,lbl) in enumerate(zip(test_eu_data,test_eu_labels)):            \n",
    "        feed_dict[enc_test_input[ui]] = dat\n",
    "        source_labels.append(src_reverse_dictionary[test_inputs[(in_i*batch_size)+test_rand_idx,ui]])\n",
    "\n",
    "    # Print the true source sentence\n",
    "    print('DE: ',test_source_sent[(in_i*batch_size)+test_rand_idx])\n",
    "    print_str = '\\t EN (TRUE):' + test_target_sent[(in_i*batch_size)+test_rand_idx]\n",
    "    print(print_str + '\\n')\n",
    "\n",
    "    \n",
    "    print_str = '\\t EN (Predicted): '            \n",
    "\n",
    "    # run prediction calculation this returns a list of prediction dec_num_unrollings long\n",
    "    # alpha_dec_unrolled is a list of dec_num_unrollings elements, \n",
    "    # where each element (another list) is num_enc_unrollings long\n",
    "    test_pred_unrolled, alpha_dec_unrolled = sess.run([test_predictions,test_alpha_i_unrolled], feed_dict=feed_dict)\n",
    "\n",
    "    target_labels = []\n",
    "    \n",
    "    # Building the attention matrix\n",
    "    attention_matrix = []\n",
    "    \n",
    "    r_i,c_i = 0, 0\n",
    "    \n",
    "    # We build the attention matrix column by column\n",
    "    for u_i, (test_pred, alpha_enc_unrolled) in enumerate(zip(test_pred_unrolled, alpha_dec_unrolled)): \n",
    "        # Column index\n",
    "        c_i = 0\n",
    "        # Current target word\n",
    "        current_tgt = tgt_reverse_dictionary[test_pred[test_rand_idx]]\n",
    "        \n",
    "        # Only add if the word is not <s> or </s> or <unk>\n",
    "        if current_tgt != '<s>' and current_tgt != '</s>' and current_tgt != '<unk>':            \n",
    "            attention_matrix.append([])\n",
    "            target_labels.append(tgt_reverse_dictionary[test_pred[test_rand_idx]])\n",
    "            print_str += tgt_reverse_dictionary[test_pred[test_rand_idx]] + ' '\n",
    "            filtered_src_labels = []\n",
    "            # Fill each row position in that column\n",
    "            for u_ii in range(enc_num_unrollings):\n",
    "                # Only add if the word is not <s> or </s> or <unk>\n",
    "                if source_labels[u_ii] != '<s>' and source_labels[u_ii] != '</s>' and source_labels[u_ii] != '<unk>':\n",
    "                    filtered_src_labels.append(source_labels[u_ii])            \n",
    "                    attention_matrix[r_i].append(alpha_enc_unrolled[test_rand_idx,u_ii])\n",
    "                    c_i += 1\n",
    "            r_i += 1\n",
    "\n",
    "    assert r_i == len(target_labels)\n",
    "    \n",
    "    # Make the above to a matrix\n",
    "    attention_matrix = np.array(attention_matrix)\n",
    "    \n",
    "    if attention_matrix.ndim == 1:\n",
    "        attention_matrix = attention_matrix.reshape(1,-1)\n",
    "    \n",
    "    # Reset test state after each batch\n",
    "    sess.run(reset_test_state)\n",
    "    \n",
    "    # Plot\n",
    "    f,ax = pylab.subplots(1,1,figsize=(5.0 + 0.5*attention_matrix.shape[0], \n",
    "                                       5.0 + 0.5*attention_matrix.shape[1]))\n",
    "    # Repetitions are used to make the attention value to a set of image pixels\n",
    "    rep_attn = np.repeat(attention_matrix,5,axis=0)\n",
    "    rep_attn = np.repeat(rep_attn,5,axis=1)\n",
    "    \n",
    "    # Correcting for source reversing\n",
    "    rep_attn = np.fliplr(rep_attn)\n",
    "    \n",
    "    # Rendering image\n",
    "    ax.imshow(rep_attn,vmin=0.0,vmax=1.0,cmap='jet')\n",
    "    \n",
    "    # Labels for columns\n",
    "    for s_i,src_text in enumerate(reversed(filtered_src_labels)):\n",
    "        ax.text(s_i*5+1,-2,src_text,rotation=90, verticalalignment='bottom',fontsize=18)\n",
    "        \n",
    "    # Labels for rows \n",
    "    for t_i,tgt_text in enumerate(target_labels):\n",
    "        ax.text(-2, t_i*5+0.5,tgt_text, horizontalalignment = 'right', fontsize=18)\n",
    "        \n",
    "    ax.axis('off')\n",
    "\n",
    "    f.savefig('attention_%d.png'%in_i)\n",
    "    pylab.close(f)\n",
    "    \n",
    " \n",
    "print('=====================================================')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
